Struct json_ld_core::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>
sourceimpl<T: Eq + Hash, B: Eq + Hash, M> NodeMapGraph<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> NodeMapGraph<T, B, M>
pub fn contains(&self, id: &Id<T, B>) -> bool
pub fn get(&self, id: &Id<T, B>) -> Option<&IndexedNode<T, B, M>>
pub fn get_mut(&mut self, id: &Id<T, B>) -> Option<&mut IndexedNode<T, B, M>>
pub fn declare_node(
&mut self,
id: Meta<Id<T, B>, M>,
index: Option<&Entry<String, M>>
) -> DeclareNodeResult<'_, T, B, M>where
T: Clone,
B: Clone,
M: Clone,
sourcepub fn merge_with(&mut self, other: Self)where
T: Clone,
B: Clone,
M: Clone,
pub fn merge_with(&mut self, other: Self)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: IndexedNode<T, B, M>)where
T: Clone,
B: Clone,
M: Clone,
pub fn merge_node(&mut self, Meta: IndexedNode<T, B, 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) -> NodeMapGraphNodes<'_, T, B, M>
pub fn into_nodes(self) -> IntoNodeMapGraphNodes<T, B, M>
Trait Implementations
sourceimpl<T, B, M> Default for NodeMapGraph<T, B, M>
impl<T, B, M> Default for NodeMapGraph<T, B, M>
sourceimpl<'a, T, B, M> IntoIterator for &'a NodeMapGraph<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a NodeMapGraph<T, B, M>
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