pub enum Resource<'g, B, I, L>{
BlankNode(B, PhantomData<&'g u8>),
IRI(I),
Literal(L),
}Expand description
A Resource is a blank node, an IRI or a literal.
Resources are used in the object position of a triple.
Variants§
BlankNode(B, PhantomData<&'g u8>)
This is a blank node.
IRI(I)
This is an IRI.
Literal(L)
This is a literal.
Implementations§
Source§impl<'g, B, I, L> Resource<'g, B, I, L>
impl<'g, B, I, L> Resource<'g, B, I, L>
Sourcepub fn is_blank_node(&self) -> bool
pub fn is_blank_node(&self) -> bool
Is this a blank node?
Sourcepub fn is_literal(&self) -> bool
pub fn is_literal(&self) -> bool
Is this a literal?
Sourcepub fn as_blank_node(&self) -> Option<&B>
pub fn as_blank_node(&self) -> Option<&B>
Cast Resource to a blank node, if applicable
Sourcepub fn as_literal(&self) -> Option<&L>
pub fn as_literal(&self) -> Option<&L>
Cast Resource to a literal, if applicable
Sourcepub fn to_blank_node_or_iri(&self) -> Option<BlankNodeOrIRI<'g, B, I>>
pub fn to_blank_node_or_iri(&self) -> Option<BlankNodeOrIRI<'g, B, I>>
Cast Resource to a BlankNodeOrIRI, if applicable
Trait Implementations§
Source§impl<'g, B, I, L> Ord for Resource<'g, B, I, L>
impl<'g, B, I, L> Ord for Resource<'g, B, I, L>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'g, B, I, L> PartialEq for Resource<'g, B, I, L>where
B: BlankNodePtr<'g> + PartialEq + 'g,
I: IRIPtr<'g> + PartialEq + 'g,
L: LiteralPtr<'g> + PartialEq + 'g,
impl<'g, B, I, L> PartialEq for Resource<'g, B, I, L>where
B: BlankNodePtr<'g> + PartialEq + 'g,
I: IRIPtr<'g> + PartialEq + 'g,
L: LiteralPtr<'g> + PartialEq + 'g,
Source§impl<'g, B, I, L> PartialOrd for Resource<'g, B, I, L>where
B: BlankNodePtr<'g> + PartialOrd + 'g,
I: IRIPtr<'g> + PartialOrd + 'g,
L: LiteralPtr<'g> + PartialOrd + 'g,
impl<'g, B, I, L> PartialOrd for Resource<'g, B, I, L>where
B: BlankNodePtr<'g> + PartialOrd + 'g,
I: IRIPtr<'g> + PartialOrd + 'g,
L: LiteralPtr<'g> + PartialOrd + 'g,
impl<'g, B, I, L> Eq for Resource<'g, B, I, L>
impl<'g, B, I, L> StructuralPartialEq for Resource<'g, B, I, L>
Auto Trait Implementations§
impl<'g, B, I, L> Freeze for Resource<'g, B, I, L>
impl<'g, B, I, L> RefUnwindSafe for Resource<'g, B, I, L>
impl<'g, B, I, L> Send for Resource<'g, B, I, L>
impl<'g, B, I, L> Sync for Resource<'g, B, I, L>
impl<'g, B, I, L> Unpin for Resource<'g, B, I, L>
impl<'g, B, I, L> UnwindSafe for Resource<'g, B, I, L>
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