pub trait Subject:
Debug
+ Display
+ PartialEq
+ Clone
+ Eq
+ Hash {
// Required method
fn kind(&self) -> TermKind;
// Provided methods
fn is_iri(&self) -> bool { ... }
fn is_blank_node(&self) -> bool { ... }
fn is_triple(&self) -> bool { ... }
}Expand description
Represents the subject position of an RDF triple.
In RDF, a subject can be an IRI, a blank node, or (in RDF-star) a triple. This trait defines the common behavior for all types that can appear as subjects in RDF statements.
Required Methods§
Provided Methods§
Sourcefn is_blank_node(&self) -> bool
fn is_blank_node(&self) -> bool
Returns true if this subject is a blank node.
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 Subject for NamedOrBlankNode
Implements the Subject trait for OxSubject (owned version).
impl Subject for NamedOrBlankNode
Implements the Subject trait for OxSubject (owned version).
This allows owned NamedOrBlankNode instances from oxrdf to be used
as RDF subjects in the core trait system.
Source§impl Subject for NamedOrBlankNodeRef<'_>
Implements the Subject trait for OxSubjectRef (borrowed version).
impl Subject for NamedOrBlankNodeRef<'_>
Implements the Subject trait for OxSubjectRef (borrowed version).
This allows borrowed NamedOrBlankNodeRef instances from oxrdf to be
used as RDF subjects without requiring ownership.