[−][src]Struct sophia::term::BNodeId
Internal representation of a blank node identifier.
May be encountered when pattern-matching on Term
s
of the BNode
variant.
For that purpose, note that BNodeId
- derefs implicitly to its internal type
T
; - can be directly compared to a
&str
with the==
operator.
Example :
use sophia::term::*; fn is_foobar(t: BoxTerm) -> bool { match t { BNode(id) => id.starts_with("foo") || id == "bar", _ => false, } }
See module documentation for more detail.
Methods
impl<T> BNodeId<T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
pub fn is_n3(&self) -> bool
[src]
Whether this blank node identifier is compatible with the N3 family of syntaxes (N-Triples, Turtle...). This can be useful for serializers.
Trait Implementations
impl<T: Clone + AsRef<str>> Clone for BNodeId<T>
[src]
fn clone(&self) -> BNodeId<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T> AsRef<str> for BNodeId<T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
impl<T, U> PartialEq<BNodeId<U>> for BNodeId<T> where
T: AsRef<str>,
U: AsRef<str>,
[src]
T: AsRef<str>,
U: AsRef<str>,
fn eq(&self, other: &BNodeId<U>) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<'a, T> PartialEq<&'a str> for BNodeId<T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
fn eq(&self, other: &&'a str) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T: Copy + AsRef<str>> Copy for BNodeId<T>
[src]
impl<T: Eq + AsRef<str>> Eq for BNodeId<T>
[src]
impl<T: Debug + AsRef<str>> Debug for BNodeId<T>
[src]
impl<T> Deref for BNodeId<T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
impl<T> Hash for BNodeId<T> where
T: AsRef<str>,
[src]
T: AsRef<str>,
Auto Trait Implementations
impl<T> Sync for BNodeId<T> where
T: Sync,
T: Sync,
impl<T> Send for BNodeId<T> where
T: Send,
T: Send,
impl<T> Unpin for BNodeId<T> where
T: Unpin,
T: Unpin,
impl<T> RefUnwindSafe for BNodeId<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> UnwindSafe for BNodeId<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> TermData for T where
T: AsRef<str> + Clone + Eq + Hash,
[src]
T: AsRef<str> + Clone + Eq + Hash,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,