Struct json_ld::flattening::NodeMap
source · pub struct NodeMap<T, B> { /* private fields */ }
Expand description
Node identifier to node definition map.
Implementations§
source§impl<T, B> NodeMap<T, B>
impl<T, B> NodeMap<T, B>
pub fn new() -> NodeMap<T, B>
pub fn into_parts( self, ) -> (NodeMapGraph<T, B>, HashMap<Id<T, B>, NodeMapGraph<T, B>>)
pub fn iter(&self) -> Iter<'_, T, B> ⓘ
pub fn iter_named(&self) -> Iter<'_, Id<T, B>, NodeMapGraph<T, B>>
source§impl<T, B> NodeMap<T, B>
impl<T, B> NodeMap<T, B>
pub fn graph(&self, id: Option<&Id<T, B>>) -> Option<&NodeMapGraph<T, B>>
pub fn graph_mut( &mut self, id: Option<&Id<T, B>>, ) -> Option<&mut NodeMapGraph<T, B>>
pub fn declare_graph(&mut self, id: Id<T, B>)
sourcepub fn merge(self) -> NodeMapGraph<T, B>
pub fn merge(self) -> NodeMapGraph<T, B>
Merge all the graphs into a single NodeMapGraph
.
The order in which graphs are merged is not defined.
source§impl<T, B> NodeMap<T, B>
impl<T, B> NodeMap<T, B>
pub fn flatten(self, ordered: bool) -> Vec<Indexed<Node<T, B>>>where
(): Vocabulary<Iri = T, BlankId = B>,
pub fn flatten_with<V>(
self,
vocabulary: &V,
ordered: bool,
) -> Vec<Indexed<Node<T, B>>>where
V: Vocabulary<Iri = T, BlankId = B>,
pub fn flatten_unordered(self) -> HashSet<Indexed<Node<T, B>>>
Trait Implementations§
source§impl<'a, T, B> IntoIterator for &'a NodeMap<T, B>
impl<'a, T, B> IntoIterator for &'a NodeMap<T, B>
§type Item = (Option<&'a Id<T, B>>, &'a NodeMapGraph<T, B>)
type Item = (Option<&'a Id<T, B>>, &'a NodeMapGraph<T, B>)
The type of the elements being iterated over.
source§impl<T, B> IntoIterator for NodeMap<T, B>
impl<T, B> IntoIterator for NodeMap<T, B>
source§impl<T, B> RdfQuads<T, B> for NodeMap<T, B>
impl<T, B> RdfQuads<T, B> for NodeMap<T, B>
fn rdf_quads_full<'n, 'g, V, G>(
&self,
vocabulary: &'n mut V,
generator: &'g mut G,
rdf_direction: Option<RdfDirection>,
produce_generalized_rdf: bool,
) -> Quads<'_, 'n, 'g, V, G> ⓘwhere
V: Vocabulary<Iri = T, BlankId = B>,
G: Generator<V>,
fn rdf_quads_with<'n, 'g, V, G>(
&self,
vocabulary: &'n mut V,
generator: &'g mut G,
rdf_direction: Option<RdfDirection>,
) -> Quads<'_, 'n, 'g, V, G> ⓘwhere
V: Vocabulary<Iri = T, BlankId = B>,
G: Generator<V>,
Auto Trait Implementations§
impl<T, B> Freeze for NodeMap<T, B>
impl<T, B> RefUnwindSafe for NodeMap<T, B>where
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B> Send for NodeMap<T, B>
impl<T, B> Sync for NodeMap<T, B>
impl<T, B> Unpin for NodeMap<T, B>
impl<T, B> UnwindSafe for NodeMap<T, B>where
B: UnwindSafe,
T: UnwindSafe,
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