pub struct NamedNodeRef<'a> { /* private fields */ }
Expand description
A borrowed RDF IRI.
The default string formatter is returning an N-Triples, Turtle, and SPARQL compatible representation:
use oxirs_core::model::NamedNodeRef;
assert_eq!(
"<http://example.com/foo>",
NamedNodeRef::new("http://example.com/foo").unwrap().to_string()
);
Implementations§
Source§impl<'a> NamedNodeRef<'a>
impl<'a> NamedNodeRef<'a>
Sourcepub const fn new_unchecked(iri: &'a str) -> Self
pub const fn new_unchecked(iri: &'a str) -> Self
Builds an RDF IRI from a string.
It is the caller’s responsibility to ensure that iri
is a valid IRI.
NamedNodeRef::new()
is a safe version of this constructor and should be used for untrusted data.
pub const fn as_str(self) -> &'a str
pub fn into_owned(self) -> NamedNode
Trait Implementations§
Source§impl<'a> Clone for NamedNodeRef<'a>
impl<'a> Clone for NamedNodeRef<'a>
Source§fn clone(&self) -> NamedNodeRef<'a>
fn clone(&self) -> NamedNodeRef<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for NamedNodeRef<'a>
impl<'a> Debug for NamedNodeRef<'a>
Source§impl Display for NamedNodeRef<'_>
impl Display for NamedNodeRef<'_>
Source§impl<'a> From<&'a NamedNode> for NamedNodeRef<'a>
impl<'a> From<&'a NamedNode> for NamedNodeRef<'a>
Source§impl From<NamedNodeRef<'_>> for Object
impl From<NamedNodeRef<'_>> for Object
Source§fn from(node: NamedNodeRef<'_>) -> Self
fn from(node: NamedNodeRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<NamedNodeRef<'_>> for Predicate
impl From<NamedNodeRef<'_>> for Predicate
Source§fn from(node: NamedNodeRef<'_>) -> Self
fn from(node: NamedNodeRef<'_>) -> Self
Converts to this type from the input type.
Source§impl From<NamedNodeRef<'_>> for Subject
impl From<NamedNodeRef<'_>> for Subject
Source§fn from(node: NamedNodeRef<'_>) -> Self
fn from(node: NamedNodeRef<'_>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<NamedNodeRef<'a>> for NamedNode
impl<'a> From<NamedNodeRef<'a>> for NamedNode
Source§fn from(node: NamedNodeRef<'a>) -> Self
fn from(node: NamedNodeRef<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> Hash for NamedNodeRef<'a>
impl<'a> Hash for NamedNodeRef<'a>
Source§impl<'a> Ord for NamedNodeRef<'a>
impl<'a> Ord for NamedNodeRef<'a>
Source§fn cmp(&self, other: &NamedNodeRef<'a>) -> Ordering
fn cmp(&self, other: &NamedNodeRef<'a>) -> Ordering
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 PartialEq<&str> for NamedNodeRef<'_>
impl PartialEq<&str> for NamedNodeRef<'_>
Source§impl PartialEq<NamedNode> for NamedNodeRef<'_>
impl PartialEq<NamedNode> for NamedNodeRef<'_>
Source§impl PartialEq<NamedNodeRef<'_>> for &str
impl PartialEq<NamedNodeRef<'_>> for &str
Source§impl PartialEq<NamedNodeRef<'_>> for NamedNode
impl PartialEq<NamedNodeRef<'_>> for NamedNode
Source§impl PartialEq<NamedNodeRef<'_>> for str
impl PartialEq<NamedNodeRef<'_>> for str
Source§impl PartialEq<str> for NamedNodeRef<'_>
impl PartialEq<str> for NamedNodeRef<'_>
Source§impl<'a> PartialEq for NamedNodeRef<'a>
impl<'a> PartialEq for NamedNodeRef<'a>
Source§impl<'a> PartialOrd for NamedNodeRef<'a>
impl<'a> PartialOrd for NamedNodeRef<'a>
Source§impl RdfTerm for NamedNodeRef<'_>
impl RdfTerm for NamedNodeRef<'_>
Source§fn is_named_node(&self) -> bool
fn is_named_node(&self) -> bool
Returns true if this is a named node (IRI)
Source§fn is_blank_node(&self) -> bool
fn is_blank_node(&self) -> bool
Returns true if this is a blank node
Source§fn is_literal(&self) -> bool
fn is_literal(&self) -> bool
Returns true if this is a literal
Source§fn is_variable(&self) -> bool
fn is_variable(&self) -> bool
Returns true if this is a variable
Source§fn is_quoted_triple(&self) -> bool
fn is_quoted_triple(&self) -> bool
Returns true if this is a quoted triple (RDF-star)
impl<'a> Copy for NamedNodeRef<'a>
impl<'a> Eq for NamedNodeRef<'a>
impl GraphNameTerm for NamedNodeRef<'_>
impl ObjectTerm for NamedNodeRef<'_>
impl PredicateTerm for NamedNodeRef<'_>
impl<'a> StructuralPartialEq for NamedNodeRef<'a>
impl SubjectTerm for NamedNodeRef<'_>
Auto Trait Implementations§
impl<'a> Freeze for NamedNodeRef<'a>
impl<'a> RefUnwindSafe for NamedNodeRef<'a>
impl<'a> Send for NamedNodeRef<'a>
impl<'a> Sync for NamedNodeRef<'a>
impl<'a> Unpin for NamedNodeRef<'a>
impl<'a> UnwindSafe for NamedNodeRef<'a>
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> 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
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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 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.