pub struct Graph { /* private fields */ }Expand description
Minimal RDF graph — a sorted set of triples.
Implementations§
Source§impl Graph
impl Graph
pub fn new() -> Self
pub fn from_triples(triples: impl IntoIterator<Item = Triple>) -> Self
pub fn insert(&mut self, triple: Triple)
pub fn remove(&mut self, triple: &Triple) -> bool
pub fn contains(&self, triple: &Triple) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn triples(&self) -> impl Iterator<Item = &Triple>
Sourcepub fn subtract(&mut self, other: &Graph)
pub fn subtract(&mut self, other: &Graph)
Remove every triple in other that is present in self.
Sourcepub fn to_ntriples(&self) -> String
pub fn to_ntriples(&self) -> String
Serialise to N-Triples.
Sourcepub fn parse_ntriples(input: &str) -> Result<Self, PodError>
pub fn parse_ntriples(input: &str) -> Result<Self, PodError>
Parse N-Triples — supports the full EBNF subset used by PATCH.
Trait Implementations§
impl Eq for Graph
impl StructuralPartialEq for Graph
Auto Trait Implementations§
impl Freeze for Graph
impl RefUnwindSafe for Graph
impl Send for Graph
impl Sync for Graph
impl Unpin for Graph
impl UnsafeUnpin for Graph
impl UnwindSafe for Graph
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