[−][src]Struct sophia_term::blank_node::BlankNode
An RDF blank node.
See module documentation for more detail.
Implementations
impl<TD> BlankNode<TD> where
TD: TermData,
[src]
TD: TermData,
pub fn new<U>(id: U) -> Result<Self> where
U: AsRef<str>,
TD: From<U>,
[src]
U: AsRef<str>,
TD: From<U>,
Return a new blank node with the given identifier.
May fail if id
is not a valid identifier according to
BLANK_NODE_LABEL
. This means that it
must not include the typical leading _:
.
pub fn new_unchecked<U>(id: U) -> Self where
U: AsRef<str>,
TD: From<U>,
[src]
U: AsRef<str>,
TD: From<U>,
Return a new blank node with the given identifier.
Pre-condition
This function requires that id
is a valid blank node identifier.
pub fn as_ref(&self) -> BlankNode<&TD>
[src]
Borrow the inner contents of the blank node.
pub fn as_ref_str(&self) -> BlankNode<&str>
[src]
Borrow the inner contents of the blank node as &str
.
pub fn map<F, TD2>(self, f: F) -> BlankNode<TD2> where
F: FnMut(TD) -> TD2,
TD2: TermData,
[src]
F: FnMut(TD) -> TD2,
TD2: TermData,
Create a new blank node by applying f
to the TermData
of self
.
pub fn map_into<TD2>(self) -> BlankNode<TD2> where
TD: Into<TD2>,
TD2: TermData,
[src]
TD: Into<TD2>,
TD2: TermData,
Maps the blank node using the Into
trait.
pub fn clone_map<'a, U, F>(&'a self, factory: F) -> BlankNode<U> where
U: TermData,
F: FnMut(&'a str) -> U,
[src]
U: TermData,
F: FnMut(&'a str) -> U,
Clone self while transforming the inner TermData
with the given
factory.
This is done in one step in contrast to calling clone().map(factory)
.
pub fn clone_into<'src, U>(&'src self) -> BlankNode<U> where
U: TermData + From<&'src str>,
[src]
U: TermData + From<&'src str>,
Apply clone_map()
using the Into
trait.
pub fn as_str(&self) -> &str
[src]
Borrow the blank nodes ID.
Note: The ID does not have a leading _:
.
pub fn write_fmt<W>(&self, w: &mut W) -> Result where
W: Write,
[src]
W: Write,
Writes the blank node to the fmt::Write
using the N3 syntax.
pub fn write_io<W>(&self, w: &mut W) -> Result<()> where
W: Write,
[src]
W: Write,
Writes the blank node to the io::Write
using the N3 syntax.
Trait Implementations
impl<TD: Clone + TermData> Clone for BlankNode<TD>
[src]
impl<TD: Copy + TermData> Copy for BlankNode<TD>
[src]
impl<TD: Debug + TermData> Debug for BlankNode<TD>
[src]
impl<TD> Deref for BlankNode<TD> where
TD: TermData,
[src]
TD: TermData,
impl<TD> Display for BlankNode<TD> where
TD: TermData,
[src]
TD: TermData,
impl<TD: Eq + TermData> Eq for BlankNode<TD>
[src]
impl<TD> From<BlankNode<TD>> for Term<TD> where
TD: TermData,
[src]
TD: TermData,
impl<TD> Hash for BlankNode<TD> where
TD: TermData,
[src]
TD: TermData,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<TD: Ord + TermData> Ord for BlankNode<TD>
[src]
fn cmp(&self, other: &BlankNode<TD>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<TD, TE: ?Sized> PartialEq<TE> for BlankNode<TD> where
TD: TermData,
TE: TTerm,
[src]
TD: TermData,
TE: TTerm,
impl<TD, TE: ?Sized> PartialOrd<TE> for BlankNode<TD> where
TD: TermData,
TE: TTerm,
[src]
TD: TermData,
TE: TTerm,
fn partial_cmp(&self, other: &TE) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<TD: TermData> StructuralEq for BlankNode<TD>
[src]
impl<TD: TermData> TTerm for BlankNode<TD>
[src]
fn kind(&self) -> TermKind
[src]
fn value_raw(&self) -> RawValue<'_>
[src]
fn as_dyn(&self) -> &dyn TTerm
[src]
fn value(&self) -> MownStr<'_>
[src]
fn datatype(&self) -> Option<SimpleIri<'_>>
[src]
fn language(&self) -> Option<&str>
[src]
fn is_absolute(&self) -> bool
[src]
impl<TD> TryCopyTerm for BlankNode<TD> where
TD: TermData + for<'x> From<&'x str>,
[src]
TD: TermData + for<'x> From<&'x str>,
type Error = TermError
The error type produced when failing to copy a given term
fn try_copy<T: ?Sized>(term: &T) -> Result<Self, Self::Error> where
T: TTerm,
[src]
T: TTerm,
impl<'a, T, U> TryFrom<&'a Term<U>> for BlankNode<T> where
T: TermData + From<&'a str>,
U: TermData,
[src]
T: TermData + From<&'a str>,
U: TermData,
type Error = TermError
The type returned in the event of a conversion error.
fn try_from(term: &'a Term<U>) -> Result<Self, Self::Error>
[src]
impl<TD> TryFrom<Term<TD>> for BlankNode<TD> where
TD: TermData,
[src]
TD: TermData,
Auto Trait Implementations
impl<TD> RefUnwindSafe for BlankNode<TD> where
TD: RefUnwindSafe,
TD: RefUnwindSafe,
impl<TD> Send for BlankNode<TD> where
TD: Send,
TD: Send,
impl<TD> Sync for BlankNode<TD> where
TD: Sync,
TD: Sync,
impl<TD> Unpin for BlankNode<TD> where
TD: Unpin,
TD: Unpin,
impl<TD> UnwindSafe for BlankNode<TD> where
TD: UnwindSafe,
TD: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> ConvertibleTerm for T where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
fn try_converted<U>(&Self) -> Result<U, TermError> where
U: TryConvertTerm,
<U as FromStr>::Err: Error,
<U as FromStr>::Err: 'static,
[src]
U: TryConvertTerm,
<U as FromStr>::Err: Error,
<U as FromStr>::Err: 'static,
impl<T> CopiableTerm for T where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
fn copied<U>(&self) -> U where
U: CopyTerm,
[src]
U: CopyTerm,
fn try_copied<U>(&self) -> Result<U, <U as TryCopyTerm>::Error> where
U: TryCopyTerm,
[src]
U: TryCopyTerm,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<U> TermMatcher for U where
U: TTerm + ?Sized,
[src]
U: TTerm + ?Sized,
type Term = U
Type of TTerm
used internally by this matcher.
fn constant(&self) -> Option<&U>
[src]
fn matches<T>(&self, t: &T) -> bool where
T: TTerm + ?Sized,
[src]
T: TTerm + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,