Skip to main content

ConcreteTriple

Struct ConcreteTriple 

Source
pub struct ConcreteTriple<R>
where R: Rdf,
{ /* private fields */ }
Expand description

A concrete implementation of an RDF triple for a specific RDF model.

§Type Parameters

  • R - The RDF implementation type that defines the specific types for subjects, predicates, and objects through its associated types

Implementations§

Source§

impl<R> ConcreteTriple<R>
where R: Rdf,

Source

pub fn new(subj: R::Subject, pred: R::IRI, obj: R::Term) -> Self

Creates a new concrete triple from owned components.

§Parameters
  • subj - The subject component from the RDF model R
  • pred - The predicate component from the RDF model R
  • obj - The object component from the RDF model R
Source

pub fn subj(&self) -> &R::Subject

Returns a reference to the subject component.

Source

pub fn pred(&self) -> &R::IRI

Returns a reference to the predicate component.

Source

pub fn obj(&self) -> &R::Term

Returns a reference to the object component.

Source

pub fn cnv<T: Rdf>(self) -> ConcreteTriple<T>
where T::Subject: From<R::Subject>, T::Term: From<R::Term>, T::IRI: From<R::IRI>,

Converts this triple from one RDF implementation to another.

§Type Parameters
  • T - The target RDF implementation type
§Trait Bounds

Requires that the target RDF model’s types can be converted from the source RDF model’s types:

  • T::Subject: From<R::Subject> - Subject conversion
  • T::Term: From<R::Term> - Term conversion
  • T::IRI: From<R::IRI> - IRI conversion

Trait Implementations§

Source§

impl<R> Display for ConcreteTriple<R>
where R: Rdf,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the triple as a string.

§Parameters
  • f - The formatter to write to

Auto Trait Implementations§

§

impl<R> Freeze for ConcreteTriple<R>
where <R as Rdf>::Subject: Freeze, <R as Rdf>::IRI: Freeze, <R as Rdf>::Term: Freeze,

§

impl<R> RefUnwindSafe for ConcreteTriple<R>
where <R as Rdf>::Subject: RefUnwindSafe, <R as Rdf>::IRI: RefUnwindSafe, <R as Rdf>::Term: RefUnwindSafe,

§

impl<R> Send for ConcreteTriple<R>
where <R as Rdf>::Subject: Send, <R as Rdf>::IRI: Send, <R as Rdf>::Term: Send,

§

impl<R> Sync for ConcreteTriple<R>
where <R as Rdf>::Subject: Sync, <R as Rdf>::IRI: Sync, <R as Rdf>::Term: Sync,

§

impl<R> Unpin for ConcreteTriple<R>
where <R as Rdf>::Subject: Unpin, <R as Rdf>::IRI: Unpin, <R as Rdf>::Term: Unpin,

§

impl<R> UnsafeUnpin for ConcreteTriple<R>
where <R as Rdf>::Subject: UnsafeUnpin, <R as Rdf>::IRI: UnsafeUnpin, <R as Rdf>::Term: UnsafeUnpin,

§

impl<R> UnwindSafe for ConcreteTriple<R>
where <R as Rdf>::Subject: UnwindSafe, <R as Rdf>::IRI: UnwindSafe, <R as Rdf>::Term: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more