Skip to main content

WithLocalGenerator

Struct WithLocalGenerator 

Source
pub struct WithLocalGenerator<G, I = ()> { /* private fields */ }

Implementations§

Source§

impl<G, I> WithLocalGenerator<G, I>

Source

pub const fn new(interpretation: I, generator: G) -> Self

Source

pub fn into_parts(self) -> (I, G)

Source

pub const fn inner_interpretation(&self) -> &I

Source

pub const fn inner_interpretation_mut(&mut self) -> &mut I

Source

pub const fn generator(&self) -> &G

Source

pub const fn generator_mut(&mut self) -> &mut G

Source

pub fn into_inner_interpretation(self) -> I

Source

pub fn into_generator(self) -> G

Trait Implementations§

Source§

impl<I: LocalInterpretationMut, G: LocalGenerator> GenerativeInterpretation for WithLocalGenerator<G, I>

Source§

fn new_resource(&mut self) -> Self::Resource

Create a new resource.
Source§

impl<I: Interpretation, G> Interpretation for WithLocalGenerator<G, I>

Source§

type Resource = <I as Interpretation>::Resource

Source§

fn iri(&self, iri: Iri<&str>) -> Option<Self::Resource>

Source§

fn literal<'a>( &self, literal: impl Into<LiteralRef<'a>>, ) -> Option<Self::Resource>

Source§

fn term<'a>(&self, term: impl Into<TermRef<'a>>) -> Option<Self::Resource>

Source§

impl<I: InterpretationMut, G> InterpretationMut for WithLocalGenerator<G, I>

Source§

fn insert_iri<'a>(&mut self, iri: impl Into<Cow<'a, IriBuf>>) -> Self::Resource

Source§

fn insert_literal<'a>( &mut self, literal: impl Into<CowLiteral<'a>>, ) -> Self::Resource

Source§

fn insert_term<'a>(&mut self, term: impl Into<CowTerm<'a>>) -> Self::Resource

Source§

impl<I: LocalInterpretation, G> LocalInterpretation for WithLocalGenerator<G, I>

Source§

fn blank_id<'a>(&'a self, blank_id: &'a BlankId) -> Option<Self::Resource>

Source§

fn local_term<'a>( &self, term: impl Into<LocalTermRef<'a>>, ) -> Option<Self::Resource>

Source§

fn triple_term(&self, _t: TripleTerm) -> Option<Self::Resource>

Looks up a triple-term resource (RDF 1.2). Default implementation returns None — interpretations that store triple terms should override.
Source§

fn id<'a>(&self, id: impl Into<IdRef<'a>>) -> Option<Self::Resource>

Source§

impl<I: LocalInterpretationMut, G> LocalInterpretationMut for WithLocalGenerator<G, I>

Source§

fn insert_blank_id<'a>( &mut self, blank_id: impl Into<Cow<'a, BlankId>>, ) -> Self::Resource

Source§

fn insert_local_term<'a>( &mut self, term: impl Into<CowLocalTerm<'a>>, ) -> Self::Resource

Source§

fn insert_triple_term(&mut self, _t: TripleTerm) -> Self::Resource

Inserts a triple-term resource (RDF 1.2). Default implementation panics — interpretations that need to ingest triple-term-bearing graphs must override this method.
Source§

fn insert_id<'a>(&mut self, term: impl Into<CowId<'a>>) -> Self::Resource

Source§

impl<I: ReverseInterpretation, G> ReverseInterpretation for WithLocalGenerator<G, I>

Source§

type Iris<'a> = <I as ReverseInterpretation>::Iris<'a> where Self: 'a

Source§

type Literals<'a> = <I as ReverseInterpretation>::Literals<'a> where Self: 'a

Source§

fn iris_of<'a>(&'a self, resource: &'a Self::Resource) -> Self::Iris<'a>

Source§

fn literals_of<'a>(&'a self, resource: &'a Self::Resource) -> Self::Literals<'a>

Source§

fn triple_term_components( &self, resource: &Self::Resource, ) -> Option<(Self::Resource, Self::Resource, Self::Resource)>

RDF 1.2: returns the components of a triple-term resource as (subject, predicate, object) if resource denotes a triple term. Default returns None (no triple-term recognition); interpretations that store triple terms should override. Read more
Source§

fn triple_term_components_view<'a>( &'a self, resource: &'a Self::Resource, ) -> Option<(Cow<'a, Self::Resource>, Cow<'a, Self::Resource>, Cow<'a, Self::Resource>)>
where Self::Resource: Clone,

Borrow-or-own view of triple-term components — the zero-clone counterpart of Self::triple_term_components. Read more
Source§

fn terms_of<'a>(&'a self, resource: &'a Self::Resource) -> TermsOf<'a, Self>

Source§

fn is_blank_id(&self, resource: &Self::Resource) -> bool

Source§

impl<I: ReverseLocalInterpretation, G> ReverseLocalInterpretation for WithLocalGenerator<G, I>

Source§

type BlankIds<'a> = <I as ReverseLocalInterpretation>::BlankIds<'a> where Self: 'a

Source§

fn blank_ids_of<'a>( &'a self, resource: &'a Self::Resource, ) -> Self::BlankIds<'a>

Source§

fn local_terms_of<'a>( &'a self, resource: &'a Self::Resource, ) -> LocalTermsOf<'a, Self>

Auto Trait Implementations§

§

impl<G, I> Freeze for WithLocalGenerator<G, I>
where I: Freeze, G: Freeze,

§

impl<G, I> RefUnwindSafe for WithLocalGenerator<G, I>

§

impl<G, I> Send for WithLocalGenerator<G, I>
where I: Send, G: Send,

§

impl<G, I> Sync for WithLocalGenerator<G, I>
where I: Sync, G: Sync,

§

impl<G, I> Unpin for WithLocalGenerator<G, I>
where I: Unpin, G: Unpin,

§

impl<G, I> UnsafeUnpin for WithLocalGenerator<G, I>
where I: UnsafeUnpin, G: UnsafeUnpin,

§

impl<G, I> UnwindSafe for WithLocalGenerator<G, I>
where I: UnwindSafe, G: 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<I> FallibleGenerativeInterpretation for I

Source§

impl<I> FallibleInterpretation for I
where I: Interpretation,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, C> FromWithContext<T, C> for T

Source§

fn from_with(value: T, _context: &C) -> T

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, U, C> IntoWithContext<U, C> for T
where U: FromWithContext<T, C>,

Source§

fn into_with(self, context: &C) -> U

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, C> TryFromWithContext<U, C> for T
where U: IntoWithContext<T, C>,

Source§

type Error = Infallible

Source§

fn try_from_with( value: U, context: &C, ) -> Result<T, <T as TryFromWithContext<U, C>>::Error>

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<T, U, C> TryIntoWithContext<U, C> for T
where U: TryFromWithContext<T, C>,

Source§

type Error = <U as TryFromWithContext<T, C>>::Error

Source§

fn try_into_with( self, context: &C, ) -> Result<U, <T as TryIntoWithContext<U, C>>::Error>

Source§

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

Source§

fn with<C>(&self, context: C) -> Contextual<&T, C>

Source§

fn into_with<C>(self, context: C) -> Contextual<T, C>
where T: Sized,