pub struct UnionView {
pub name: String,
/* private fields */
}Expand description
A virtual view that presents the union of multiple named graph views.
Duplicate triples (appearing in more than one source graph) are deduplicated
when deduplicate is set to true.
Fields§
§name: StringHuman-readable name for this union view.
Implementations§
Source§impl UnionView
impl UnionView
Sourcepub fn new(name: &str, graphs: Vec<GraphView>, deduplicate: bool) -> Self
pub fn new(name: &str, graphs: Vec<GraphView>, deduplicate: bool) -> Self
Create a new union view over the given graphs.
Sourcepub fn triples(&self) -> Vec<&RdfTriple>
pub fn triples(&self) -> Vec<&RdfTriple>
Enumerate all triples from all source graphs.
If deduplicate is set, duplicate triples across graphs are returned only once.
Sourcepub fn find(
&self,
subject: Option<&str>,
predicate: Option<&str>,
object: Option<&str>,
) -> Vec<&RdfTriple>
pub fn find( &self, subject: Option<&str>, predicate: Option<&str>, object: Option<&str>, ) -> Vec<&RdfTriple>
Find triples matching a pattern across all source graphs.
pub fn is_empty(&self) -> bool
Sourcepub fn graph_count(&self) -> usize
pub fn graph_count(&self) -> usize
Number of source graphs.
Sourcepub fn graph_names(&self) -> Vec<&str>
pub fn graph_names(&self) -> Vec<&str>
Names of all source graphs.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnionView
impl RefUnwindSafe for UnionView
impl Send for UnionView
impl Sync for UnionView
impl Unpin for UnionView
impl UnsafeUnpin for UnionView
impl UnwindSafe for UnionView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more