Skip to main content

BlankNode

Trait BlankNode 

Source
pub trait BlankNode:
    Debug
    + Display
    + PartialEq {
    // Required methods
    fn new(id: impl Into<String>) -> Self;
    fn id(&self) -> &str;
}
Expand description

Represents an owned blank node in RDF.

Blank nodes are anonymous resources in RDF that don’t have global identifiers. They are only meaningful within the scope of a single RDF graph and are used to represent resources that don’t need to be referenced outside of that context.

Required Methods§

Source

fn new(id: impl Into<String>) -> Self

Constructs a new blank node with the given identifier.

§Arguments
  • id - The identifier for this blank node. Accepts any type convertible to String, such as &str or String.
Source

fn id(&self) -> &str

Returns the identifier of this blank node as a string slice.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl BlankNode for BlankNode

Implements the BlankNode trait for OxBlankNode.

Provides construction and access to blank node identifiers.

Source§

fn new(id: impl Into<String>) -> Self

Creates a new blank node with the given identifier.

§Parameters
  • id: The blank node identifier (converted to String)
Source§

fn id(&self) -> &str

Returns the identifier of this blank node.

Implementors§