[][src]Struct oxigraph::model::BlankNode

pub struct BlankNode(_);

An owned RDF blank node.

The common way to create a new blank node is to use the BlankNode::default function.

It is also possible to create a blank node from a blank node identifier using the BlankNode::new function. The blank node identifier must be valid according to N-Triples, Turtle and SPARQL grammars.

The default string formatter is returning an N-Triples, Turtle and SPARQL compatible representation:

use oxigraph::model::BlankNode;

assert_eq!(
    "_:a122",
    BlankNode::new("a122")?.to_string()
);

Implementations

impl BlankNode[src]

pub fn new(id: impl Into<String>) -> Result<Self, BlankNodeIdParseError>[src]

Creates a blank node from a unique identifier.

The blank node identifier must be valid according to N-Triples, Turtle and SPARQL grammars.

In most cases, it is much more convenient to create a blank node using BlankNode::default() that creates a random ID that could be easily inlined by Oxigraph stores.

pub fn new_unchecked(id: impl Into<String>) -> Self[src]

Creates a blank node from a unique identifier without validation.

It is the caller's responsibility to ensure that id is a valid blank node identifier according to N-Triples, Turtle and SPARQL grammars.

new is a safe version of this constructor and should be used for untrusted data.

pub fn new_from_unique_id(id: impl Into<u128>) -> Self[src]

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().

pub fn as_str(&self) -> &str[src]

Returns the underlying ID of this blank node

pub fn into_string(self) -> String[src]

Returns the underlying ID of this blank node

pub fn as_ref(&self) -> BlankNodeRef<'_>[src]

Trait Implementations

impl Clone for BlankNode[src]

impl Debug for BlankNode[src]

impl Default for BlankNode[src]

fn default() -> Self[src]

Builds a new RDF blank node with a unique id

impl Display for BlankNode[src]

impl Eq for BlankNode[src]

impl<'a> From<&'a BlankNode> for BlankNodeRef<'a>[src]

impl<'a> From<&'a BlankNode> for NamedOrBlankNodeRef<'a>[src]

impl<'a> From<&'a BlankNode> for TermRef<'a>[src]

impl<'a> From<&'a BlankNode> for GraphNameRef<'a>[src]

impl From<BlankNode> for NamedOrBlankNode[src]

impl From<BlankNode> for Term[src]

impl From<BlankNode> for GraphName[src]

impl<'a> From<BlankNodeRef<'a>> for BlankNode[src]

impl Hash for BlankNode[src]

impl PartialEq<BlankNode> for BlankNode[src]

impl<'_> PartialEq<BlankNode> for BlankNodeRef<'_>[src]

impl<'_> PartialEq<BlankNodeRef<'_>> for BlankNode[src]

impl StructuralEq for BlankNode[src]

impl StructuralPartialEq for BlankNode[src]

impl TTerm for BlankNode[src]

impl TryCopyTerm for BlankNode[src]

type Error = SophiaToOxigraphConversionError

The error type produced when failing to copy a given term

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CopiableTerm for T where
    T: TTerm + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<U> TermMatcher for U where
    U: TTerm + ?Sized
[src]

type Term = U

Type of TTerm used internally by this matcher.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,