Struct rdftk_memgraph::simple::MemGraph [−][src]
pub struct MemGraph { /* fields omitted */ }
Expand description
A very simple in-memory implementation of the Graph
and NamedGraph
traits.
Implementations
impl<'a> MemGraph
[src]
impl<'a> MemGraph
[src]pub fn with(&mut self, statements: StatementList) -> &mut Self
[src]
pub fn with(&mut self, statements: StatementList) -> &mut Self
[src]Construct a new MemGraph
from the list of statements.
Trait Implementations
impl Featured for MemGraph
[src]
impl Featured for MemGraph
[src]fn supports_feature(&self, _feature: &IRIRef) -> bool
[src]
fn supports_feature(&self, _feature: &IRIRef) -> bool
[src]Return true if this instance, or factory, supports the feature identified by the IRI. Read more
impl Graph for MemGraph
[src]
impl Graph for MemGraph
[src]fn is_empty(&self) -> bool
[src]
fn is_empty(&self) -> bool
[src]Returns true
if there are no statements in this graph, else false
. Read more
fn contains_subject(&self, subject: &SubjectNodeRef) -> bool
[src]
fn contains_subject(&self, subject: &SubjectNodeRef) -> bool
[src]Returns true
if this graph contains any statement with the provided subject, else false
. Read more
fn contains_individual(&self, subject: &IRIRef) -> bool
[src]
fn contains_individual(&self, subject: &IRIRef) -> bool
[src]Returns true
if this graph contains any statement with the provided IRI as subject, else
false
. Read more
fn matches(
&self,
subject: Option<&SubjectNodeRef>,
predicate: Option<&IRIRef>,
object: Option<&ObjectNodeRef>
) -> HashSet<&StatementRef>
[src]
fn matches(
&self,
subject: Option<&SubjectNodeRef>,
predicate: Option<&IRIRef>,
object: Option<&ObjectNodeRef>
) -> HashSet<&StatementRef>
[src]Returns true
if this graph contains the any statement with the provided subject,
predicate, and object, else false
. Read more
fn statements<'a>(&'a self) -> Box<dyn Iterator<Item = &'a StatementRef> + 'a>
[src]
fn statements<'a>(&'a self) -> Box<dyn Iterator<Item = &'a StatementRef> + 'a>
[src]Return an iterator over all the statements in the graph. Read more
fn subjects(&self) -> HashSet<&SubjectNodeRef>
[src]
fn subjects(&self) -> HashSet<&SubjectNodeRef>
[src]Return a set of all subjects in the graph, note that this is a set so that it removes duplicates. Read more
fn predicates(&self) -> HashSet<&IRIRef>
[src]
fn predicates(&self) -> HashSet<&IRIRef>
[src]Return a set of all predicate in the graph, note that this is a set so that it removes duplicates. Read more
fn predicates_for(&self, subject: &SubjectNodeRef) -> HashSet<&IRIRef>
[src]
fn predicates_for(&self, subject: &SubjectNodeRef) -> HashSet<&IRIRef>
[src]Return a set of all predicate referenced by the provided subject in the graph, note that this is a set so that it removes duplicates. Read more
fn objects(&self) -> HashSet<&ObjectNodeRef>
[src]
fn objects(&self) -> HashSet<&ObjectNodeRef>
[src]Return a set of all objects in the graph, note that this is a set so that it removes duplicates. Read more
fn objects_for(
&self,
subject: &SubjectNodeRef,
predicate: &IRIRef
) -> HashSet<&ObjectNodeRef>
[src]
fn objects_for(
&self,
subject: &SubjectNodeRef,
predicate: &IRIRef
) -> HashSet<&ObjectNodeRef>
[src]Return a set of all objects referenced by the provided subject and predicate in the graph, note that this is a set so that it removes duplicates. Read more
fn prefix_mappings(&self) -> PrefixMappingRef
[src]
fn prefix_mappings(&self) -> PrefixMappingRef
[src]Returns the set of prefix mappings held by the graph. Read more
fn set_prefix_mappings(&mut self, mappings: PrefixMappingRef)
[src]
fn set_prefix_mappings(&mut self, mappings: PrefixMappingRef)
[src]Set the prefix mappings held by the graph. Read more
fn factory(&self) -> GraphFactoryRef
[src]
fn factory(&self) -> GraphFactoryRef
[src]Return the factory that creates graphs of this kind. Read more
fn statements_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut StatementRef> + 'a>
[src]
fn statements_mut<'a>(
&'a mut self
) -> Box<dyn Iterator<Item = &'a mut StatementRef> + 'a>
[src]Return an iterator over all the statements in the graph. Read more
fn insert(&mut self, statement: StatementRef)
[src]
fn insert(&mut self, statement: StatementRef)
[src]Insert a new statement into the graph. Read more
fn merge(&mut self, other: &Self)
[src]
fn merge(&mut self, other: &Self)
[src]Merge another graph into this one. Note that the graphs are required to have the same
implementation type based in the type qualifiers for StatementIter
. Read more
fn dedup(&mut self)
[src]
fn dedup(&mut self)
[src]Remove any duplicates within the graph, replacing any number of identical statements with just one. Read more
fn remove(&mut self, statement: &StatementRef)
[src]
fn remove(&mut self, statement: &StatementRef)
[src]Remove any statement that matches the provided. If a graph has duplicates this method does not differentiate between them. Read more
fn remove_all_for(&mut self, subject: &SubjectNodeRef)
[src]
fn remove_all_for(&mut self, subject: &SubjectNodeRef)
[src]Remove all statements from this graph that have the provided subject. Read more
fn contains(&self, statement: &Rc<Statement>) -> bool
[src]
fn contains(&self, statement: &Rc<Statement>) -> bool
[src]Returns true
if this graph contains the provided statement, else false
. Read more
fn contains_all(
&self,
subject: &Rc<SubjectNode>,
predicate: &Arc<IRI>,
object: &Rc<ObjectNode>
) -> bool
[src]
fn contains_all(
&self,
subject: &Rc<SubjectNode>,
predicate: &Arc<IRI>,
object: &Rc<ObjectNode>
) -> bool
[src]Returns true
if this graph contains the any statement with the provided subject,
predicate, and object, else false
. Read more
fn value_factory(&self) -> Option<Arc<dyn ValueFactory + 'static>>
[src]
fn value_factory(&self) -> Option<Arc<dyn ValueFactory + 'static>>
[src]Returns the value factory that is associated with this graph, if present. Read more
Auto Trait Implementations
impl !RefUnwindSafe for MemGraph
impl !Send for MemGraph
impl !Sync for MemGraph
impl Unpin for MemGraph
impl !UnwindSafe for MemGraph
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more