Struct json_ld::flattening::NodeMapGraph
source · [−]pub struct NodeMapGraph<T, B, M> { /* private fields */ }
Implementations
sourceimpl<T, B, M> NodeMapGraph<T, B, M>
impl<T, B, M> NodeMapGraph<T, B, M>
pub fn new() -> NodeMapGraph<T, B, M>
sourceimpl<T, B, M> NodeMapGraph<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> NodeMapGraph<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
pub fn contains(&self, id: &Id<T, B>) -> bool
pub fn get(&self, id: &Id<T, B>) -> Option<&Meta<Indexed<Node<T, B, M>, M>, M>>
pub fn get_mut(
&mut self,
id: &Id<T, B>
) -> Option<&mut Meta<Indexed<Node<T, B, M>, M>, M>>
pub fn declare_node(
&mut self,
id: Meta<Id<T, B>, M>,
index: Option<&Entry<String, M>>
) -> Result<&mut Indexed<Node<T, B, M>, M>, ConflictingIndexes<T, B, M>>where
T: Clone,
B: Clone,
M: Clone,
sourcepub fn merge_with(&mut self, other: NodeMapGraph<T, B, M>)where
T: Clone,
B: Clone,
M: Clone,
pub fn merge_with(&mut self, other: NodeMapGraph<T, B, M>)where
T: Clone,
B: Clone,
M: Clone,
Merge this graph with other
.
This calls merge_node
with every node of other
.
sourcepub fn merge_node(&mut self, Meta<Indexed<Node<T, B, M>, M>, M>)where
T: Clone,
B: Clone,
M: Clone,
pub fn merge_node(&mut self, Meta<Indexed<Node<T, B, M>, M>, M>)where
T: Clone,
B: Clone,
M: Clone,
Merge the given node
into the graph.
The node
must has an identifier, or this function will have no effect.
If there is already a node with the same identifier:
- The index of
node
, if any, overrides the previously existing index. - The list of
node
types is concatenated after the preexisting types. - The graph and imported values are overridden.
- Properties and reverse properties are merged.
pub fn nodes(&self) -> Values<'_, Id<T, B>, Meta<Indexed<Node<T, B, M>, M>, M>>
pub fn into_nodes(
self
) -> IntoValues<Id<T, B>, Meta<Indexed<Node<T, B, M>, M>, M>>
Trait Implementations
sourceimpl<T, B, M> Default for NodeMapGraph<T, B, M>
impl<T, B, M> Default for NodeMapGraph<T, B, M>
sourcefn default() -> NodeMapGraph<T, B, M>
fn default() -> NodeMapGraph<T, B, M>
Returns the “default value” for a type. Read more
sourceimpl<'a, T, B, M> IntoIterator for &'a NodeMapGraph<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a NodeMapGraph<T, B, M>
type Item = (&'a Id<T, B>, &'a Meta<Indexed<Node<T, B, M>, M>, M>)
type Item = (&'a Id<T, B>, &'a Meta<Indexed<Node<T, B, M>, M>, M>)
The type of the elements being iterated over.
type IntoIter = Iter<'a, Id<T, B>, Meta<Indexed<Node<T, B, M>, M>, M>>
type IntoIter = Iter<'a, Id<T, B>, Meta<Indexed<Node<T, B, M>, M>, M>>
Which kind of iterator are we turning this into?
sourcefn into_iter(self) -> <&'a NodeMapGraph<T, B, M> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a NodeMapGraph<T, B, M> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
sourceimpl<T, B, M> IntoIterator for NodeMapGraph<T, B, M>
impl<T, B, M> IntoIterator for NodeMapGraph<T, B, M>
type Item = (Id<T, B>, Meta<Indexed<Node<T, B, M>, M>, M>)
type Item = (Id<T, B>, Meta<Indexed<Node<T, B, M>, M>, M>)
The type of the elements being iterated over.
type IntoIter = IntoIter<Id<T, B>, Meta<Indexed<Node<T, B, M>, M>, M>>
type IntoIter = IntoIter<Id<T, B>, Meta<Indexed<Node<T, B, M>, M>, M>>
Which kind of iterator are we turning this into?
sourcefn into_iter(self) -> <NodeMapGraph<T, B, M> as IntoIterator>::IntoIter
fn into_iter(self) -> <NodeMapGraph<T, B, M> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Auto Trait Implementations
impl<T, B, M> RefUnwindSafe for NodeMapGraph<T, B, M>where
B: RefUnwindSafe,
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B, M> Send for NodeMapGraph<T, B, M>where
B: Send,
M: Send,
T: Send,
impl<T, B, M> Sync for NodeMapGraph<T, B, M>where
B: Sync,
M: Sync,
T: Sync,
impl<T, B, M> Unpin for NodeMapGraph<T, B, M>where
B: Unpin,
M: Unpin,
T: Unpin,
impl<T, B, M> UnwindSafe for NodeMapGraph<T, B, M>where
B: UnwindSafe,
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more