pub enum ResourceInterpretation<'a, I: Interpretation> {
Interpreted(&'a I::Resource),
Uninterpreted(Option<CowRdfTerm<'a>>),
}Expand description
Resource interpretation.
Variants§
Interpreted(&'a I::Resource)
Interpreted resource.
Uninterpreted(Option<CowRdfTerm<'a>>)
Uninterpreted resource with the given optional lexical representation.
It can be used to give an actual interpretation to the resource, bound to its lexical representation.
Implementations§
Source§impl<'a, I: Interpretation> ResourceInterpretation<'a, I>
impl<'a, I: Interpretation> ResourceInterpretation<'a, I>
Sourcepub fn as_interpreted(&self) -> Option<&'a I::Resource>
pub fn as_interpreted(&self) -> Option<&'a I::Resource>
Returns the interpreted resource, if this interpretation is one.
Sourcepub fn as_uninterpreted(&self) -> Option<&CowRdfTerm<'a>>
pub fn as_uninterpreted(&self) -> Option<&CowRdfTerm<'a>>
Returns the lexical term, if this interpretation is uninterpreted.
Sourcepub fn into_lexical_representation(
self,
interpretation: &'a I,
) -> Option<CowRdfTerm<'a>>where
I: ReverseInterpretation + ReverseLocalInterpretation,
pub fn into_lexical_representation(
self,
interpretation: &'a I,
) -> Option<CowRdfTerm<'a>>where
I: ReverseInterpretation + ReverseLocalInterpretation,
Resolves this interpretation into a lexical term, looking the resource
up in interpretation when necessary.
Trait Implementations§
Auto Trait Implementations§
impl<'a, I> !Freeze for ResourceInterpretation<'a, I>
impl<'a, I> !Send for ResourceInterpretation<'a, I>
impl<'a, I> !Sync for ResourceInterpretation<'a, I>
impl<'a, I> RefUnwindSafe for ResourceInterpretation<'a, I>
impl<'a, I> Unpin for ResourceInterpretation<'a, I>
impl<'a, I> UnsafeUnpin for ResourceInterpretation<'a, I>
impl<'a, I> UnwindSafe for ResourceInterpretation<'a, I>
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.