pub enum RdfNode {
Uri(String),
BlankNode(String),
Literal {
value: String,
language: Option<String>,
datatype: Option<String>,
},
}Expand description
An RDF node (subject or object in a triple).
Variants§
Uri(String)
A named node (IRI/URI).
BlankNode(String)
A blank node with a local identifier.
Literal
A literal value with optional language tag or datatype.
Implementations§
Source§impl RdfNode
impl RdfNode
Sourcepub fn literal_with_lang(
value: impl Into<String>,
lang: impl Into<String>,
) -> Self
pub fn literal_with_lang( value: impl Into<String>, lang: impl Into<String>, ) -> Self
Creates a new literal with a language tag.
Sourcepub fn typed_literal(
value: impl Into<String>,
datatype: impl Into<String>,
) -> Self
pub fn typed_literal( value: impl Into<String>, datatype: impl Into<String>, ) -> Self
Creates a new typed literal.
Sourcepub const fn is_literal(&self) -> bool
pub const fn is_literal(&self) -> bool
Returns true if this is a literal.
Sourcepub fn bflc_class(class_name: &str) -> Self
pub fn bflc_class(class_name: &str) -> Self
Creates a BFLC class URI.
Trait Implementations§
impl Eq for RdfNode
impl StructuralPartialEq for RdfNode
Auto Trait Implementations§
impl Freeze for RdfNode
impl RefUnwindSafe for RdfNode
impl Send for RdfNode
impl Sync for RdfNode
impl Unpin for RdfNode
impl UnsafeUnpin for RdfNode
impl UnwindSafe for RdfNode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more