Skip to main content

UnionGraph

Struct UnionGraph 

Source
pub struct UnionGraph<'a, G: GraphRead + ?Sized> { /* private fields */ }
Expand description

Expose the union as the default graph while preserving original named graphs. The source must remain consistent throughout a read, as a borrowed Dataset or native transaction does. A repeated exact match must select the same first quad; no sorted order is required.

Implementations§

Source§

impl<'a, G: GraphRead + ?Sized> UnionGraph<'a, G>

Source

pub fn new(source: &'a G) -> Self

Borrow a consistent source; do not clone or snapshot its base data.

Trait Implementations§

Source§

impl<'source, G: GraphRead + ?Sized> GraphRead for UnionGraph<'source, G>

Source§

fn matching_quads<'a>( &'a self, subject: Option<NamedOrBlankNodeRef<'_>>, predicate: Option<NamedNodeRef<'_>>, object: Option<TermRef<'_>>, graph: Option<GraphNameRef<'_>>, ) -> impl Iterator<Item = Result<Quad>> + use<'a, 'source, G>

Stream matching quads. Read failures must remain errors, never omissions. Retain the source borrow, not the caller’s temporary pattern references.
Source§

fn named_graphs(&self) -> impl Iterator<Item = Result<NamedOrBlankNode>> + '_

Stream each named graph exactly once, including empty backend graphs. Iteration must not materialize the set of graph names.
Source§

fn contains_named_graph(&self, graph: &NamedOrBlankNode) -> Result<bool>

Test graph existence, including empty graphs in capable storage backends.

Auto Trait Implementations§

§

impl<'a, G> Freeze for UnionGraph<'a, G>
where G: ?Sized,

§

impl<'a, G> RefUnwindSafe for UnionGraph<'a, G>
where G: RefUnwindSafe + ?Sized,

§

impl<'a, G> Send for UnionGraph<'a, G>
where G: Sync + ?Sized,

§

impl<'a, G> Sync for UnionGraph<'a, G>
where G: Sync + ?Sized,

§

impl<'a, G> Unpin for UnionGraph<'a, G>
where G: ?Sized,

§

impl<'a, G> UnsafeUnpin for UnionGraph<'a, G>
where G: ?Sized,

§

impl<'a, G> UnwindSafe for UnionGraph<'a, G>
where G: RefUnwindSafe + ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V