pub struct BlankNode { /* private fields */ }Expand description
A blank node identifier
Blank nodes are local identifiers used in RDF graphs that don’t have global meaning. Supports both named identifiers and efficient numerical IDs.
Implementations§
Source§impl BlankNode
impl BlankNode
Sourcepub fn new_unchecked(id: impl Into<String>) -> Self
pub fn new_unchecked(id: impl Into<String>) -> Self
Creates a new blank node without validation
§Safety
The caller must ensure the ID is valid and properly formatted
Sourcepub fn new_from_unique_id(id: u128) -> Self
pub fn new_from_unique_id(id: u128) -> Self
Creates a blank node from a unique numerical id.
In most cases, it is much more convenient to create a blank node using BlankNode::default().
Sourcepub fn new_unique() -> Self
pub fn new_unique() -> Self
Generates a new unique blank node with collision detection
This method ensures global uniqueness across all threads and sessions
Sourcepub fn new_unique_with_prefix(prefix: &str) -> Result<Self, OxirsError>
pub fn new_unique_with_prefix(prefix: &str) -> Result<Self, OxirsError>
Generates a new unique blank node with a custom prefix
Sourcepub fn unique_id(&self) -> Option<u128>
pub fn unique_id(&self) -> Option<u128>
Returns the internal numerical ID of this blank node if it has been created using BlankNode::new_from_unique_id or BlankNode::default.
Sourcepub fn as_ref(&self) -> BlankNodeRef<'_>
pub fn as_ref(&self) -> BlankNodeRef<'_>
Returns a reference to this BlankNode as a BlankNodeRef
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BlankNode
impl<'de> Deserialize<'de> for BlankNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'a> From<&'a BlankNode> for BlankNodeRef<'a>
impl<'a> From<&'a BlankNode> for BlankNodeRef<'a>
Source§impl From<BlankNode> for NamedOrBlankNode
impl From<BlankNode> for NamedOrBlankNode
Source§impl From<BlankNode> for TermPattern
impl From<BlankNode> for TermPattern
Source§impl From<BlankNode> for TermPattern
impl From<BlankNode> for TermPattern
Source§impl<'a> From<BlankNodeRef<'a>> for BlankNode
impl<'a> From<BlankNodeRef<'a>> for BlankNode
Source§fn from(node_ref: BlankNodeRef<'a>) -> Self
fn from(node_ref: BlankNodeRef<'a>) -> Self
Source§impl Ord for BlankNode
impl Ord for BlankNode
Source§impl PartialOrd for BlankNode
impl PartialOrd for BlankNode
Source§impl RdfTerm for BlankNode
impl RdfTerm for BlankNode
Source§fn is_blank_node(&self) -> bool
fn is_blank_node(&self) -> bool
Source§fn is_named_node(&self) -> bool
fn is_named_node(&self) -> bool
Source§fn is_literal(&self) -> bool
fn is_literal(&self) -> bool
Source§fn is_variable(&self) -> bool
fn is_variable(&self) -> bool
Source§fn is_quoted_triple(&self) -> bool
fn is_quoted_triple(&self) -> bool
impl Eq for BlankNode
impl ObjectTerm for BlankNode
impl StructuralPartialEq for BlankNode
impl SubjectTerm for BlankNode
Auto Trait Implementations§
impl Freeze for BlankNode
impl RefUnwindSafe for BlankNode
impl Send for BlankNode
impl Sync for BlankNode
impl Unpin for BlankNode
impl UnsafeUnpin for BlankNode
impl UnwindSafe for BlankNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.