Struct json_ld_core::flattening::NodeMapGraph
source · pub struct NodeMapGraph<T, B, M> { /* private fields */ }
Implementations§
source§impl<T, B, M> NodeMapGraph<T, B, M>
impl<T, B, M> NodeMapGraph<T, B, M>
source§impl<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>
sourcepub fn merge_with(&mut self, other: Self)
pub fn merge_with(&mut self, other: Self)
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>)
pub fn merge_node(&mut self, Meta: IndexedNode<T, B, M>)
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§
source§impl<T, B, M> Default for NodeMapGraph<T, B, M>
impl<T, B, M> Default for NodeMapGraph<T, B, M>
source§impl<'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>
impl<T, B, M> Send for NodeMapGraph<T, B, M>
impl<T, B, M> Sync for NodeMapGraph<T, B, M>
impl<T, B, M> Unpin for NodeMapGraph<T, B, M>
impl<T, B, M> UnwindSafe for NodeMapGraph<T, B, M>
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