pub struct Environment<'n, N: Vocabulary, G> { /* private fields */ }Expand description
Vocabulary and blank node generator used while flattening.
Implementations§
Source§impl<'n, N: Vocabulary, G> Environment<'n, N, G>
impl<'n, N: Vocabulary, G> Environment<'n, N, G>
Source§impl<V, G: LocalGenerator> Environment<'_, V, G>
impl<V, G: LocalGenerator> Environment<'_, V, G>
Sourcepub fn assign(
&mut self,
blank_id: V::BlankId,
) -> Result<ValidId<V::Iri, V::BlankId>, GeneratedIdError>
pub fn assign( &mut self, blank_id: V::BlankId, ) -> Result<ValidId<V::Iri, V::BlankId>, GeneratedIdError>
Returns the identifier this blank node was relabelled to, generating one on first sight.
§Errors
Returns an error when the generator runs out of identifiers.
Sourcepub fn assign_node_id(
&mut self,
r: Option<&VocabularyId<V>>,
) -> Result<Id<V::Iri, V::BlankId>, GeneratedIdError>
pub fn assign_node_id( &mut self, r: Option<&VocabularyId<V>>, ) -> Result<Id<V::Iri, V::BlankId>, GeneratedIdError>
Returns the identifier of a node, generating a blank one when the node is anonymous.
§Errors
Returns an error when the generator runs out of identifiers.
Auto Trait Implementations§
impl<'n, N, G> !UnwindSafe for Environment<'n, N, G>
impl<'n, N, G> Freeze for Environment<'n, N, G>where
&'n mut N: Freeze,
G: Freeze,
HashMap<<N as BlankIdVocabulary>::BlankId, ValidId<<N as IriVocabulary>::Iri, <N as BlankIdVocabulary>::BlankId>>: Freeze,
impl<'n, N, G> RefUnwindSafe for Environment<'n, N, G>where
&'n mut N: RefUnwindSafe,
G: RefUnwindSafe,
HashMap<<N as BlankIdVocabulary>::BlankId, ValidId<<N as IriVocabulary>::Iri, <N as BlankIdVocabulary>::BlankId>>: RefUnwindSafe,
impl<'n, N, G> Send for Environment<'n, N, G>where
&'n mut N: Send,
G: Send,
HashMap<<N as BlankIdVocabulary>::BlankId, ValidId<<N as IriVocabulary>::Iri, <N as BlankIdVocabulary>::BlankId>>: Send,
impl<'n, N, G> Sync for Environment<'n, N, G>where
&'n mut N: Sync,
G: Sync,
HashMap<<N as BlankIdVocabulary>::BlankId, ValidId<<N as IriVocabulary>::Iri, <N as BlankIdVocabulary>::BlankId>>: Sync,
impl<'n, N, G> Unpin for Environment<'n, N, G>where
&'n mut N: Unpin,
G: Unpin,
HashMap<<N as BlankIdVocabulary>::BlankId, ValidId<<N as IriVocabulary>::Iri, <N as BlankIdVocabulary>::BlankId>>: Unpin,
impl<'n, N, G> UnsafeUnpin for Environment<'n, N, G>where
&'n mut N: UnsafeUnpin,
G: UnsafeUnpin,
HashMap<<N as BlankIdVocabulary>::BlankId, ValidId<<N as IriVocabulary>::Iri, <N as BlankIdVocabulary>::BlankId>>: UnsafeUnpin,
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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.