pub struct StaticDomain<R>(/* private fields */);Expand description
Trivial domain implementation that just fixes the resource type R,
without tracking any actual resource.
Useful whenever a Domain is required by a trait bound but no
domain-specific behavior (finiteness, generation, etc.) is needed, or as
a default/building block for other, more specific domains.
Implementations§
Source§impl<R> StaticDomain<R>
impl<R> StaticDomain<R>
Sourcepub fn new() -> StaticDomain<R>
pub fn new() -> StaticDomain<R>
Creates a new static domain.
Trait Implementations§
Source§impl<R> Default for StaticDomain<R>
impl<R> Default for StaticDomain<R>
Source§fn default() -> StaticDomain<R>
fn default() -> StaticDomain<R>
Returns the “default value” for a type. Read more
Source§impl GroundInterpretation for StaticDomain<Term>
impl GroundInterpretation for StaticDomain<Term>
Source§fn literal<'a>(&self, literal: impl Into<LiteralRef<'a>>) -> Option<Term>
fn literal<'a>(&self, literal: impl Into<LiteralRef<'a>>) -> Option<Term>
Interprets the given literal, if possible.
Source§fn ground_term<'a>(
&self,
term: impl Into<GroundTermRef<'a>>,
) -> Option<Self::Resource>
fn ground_term<'a>( &self, term: impl Into<GroundTermRef<'a>>, ) -> Option<Self::Resource>
Interprets the given ground term (an IRI or a literal), if possible.
Source§impl GroundInterpretationMut for StaticDomain<Term>
impl GroundInterpretationMut for StaticDomain<Term>
Source§fn insert_iri<'a>(&mut self, iri: impl Into<Cow<'a, Iri>>) -> Self::Resource
fn insert_iri<'a>(&mut self, iri: impl Into<Cow<'a, Iri>>) -> Self::Resource
Interprets the given IRI, inserting a fresh resource for it if none
exists yet.
Source§fn insert_literal<'a>(
&mut self,
literal: impl Into<CowLiteral<'a>>,
) -> Self::Resource
fn insert_literal<'a>( &mut self, literal: impl Into<CowLiteral<'a>>, ) -> Self::Resource
Interprets the given literal, inserting a fresh resource for it if
none exists yet.
Source§fn insert_ground_term<'a>(
&mut self,
term: impl Into<CowGroundTerm<'a>>,
) -> Self::Resource
fn insert_ground_term<'a>( &mut self, term: impl Into<CowGroundTerm<'a>>, ) -> Self::Resource
Interprets the given ground term, inserting a fresh resource for it
if none exists yet.
Source§impl ReverseGroundInterpretation for StaticDomain<Term>
impl ReverseGroundInterpretation for StaticDomain<Term>
Source§type Literals<'a> = IntoIter<LiteralRef<'a>>
type Literals<'a> = IntoIter<LiteralRef<'a>>
Iterator over the literals of a resource.
Source§fn iris_of<'a>(&'a self, resource: &'a Self::Resource) -> Self::Iris<'a>
fn iris_of<'a>(&'a self, resource: &'a Self::Resource) -> Self::Iris<'a>
Returns an iterator over the IRIs of
resource.Source§fn literals_of<'a>(&'a self, resource: &'a Self::Resource) -> Self::Literals<'a>
fn literals_of<'a>(&'a self, resource: &'a Self::Resource) -> Self::Literals<'a>
Returns an iterator over the literals of
resource.Source§fn ground_terms_of<'a>(
&'a self,
resource: &'a Self::Resource,
) -> GroundTermsOf<'a, Self> ⓘ
fn ground_terms_of<'a>( &'a self, resource: &'a Self::Resource, ) -> GroundTermsOf<'a, Self> ⓘ
Returns an iterator over the ground terms (IRIs and literals) of
resource.Source§fn is_anonymous(&self, resource: &Self::Resource) -> bool
fn is_anonymous(&self, resource: &Self::Resource) -> bool
Checks whether
resource has no ground term lexical representation.Auto Trait Implementations§
impl<R> Freeze for StaticDomain<R>
impl<R> RefUnwindSafe for StaticDomain<R>where
R: RefUnwindSafe,
impl<R> Send for StaticDomain<R>where
R: Send,
impl<R> Sync for StaticDomain<R>where
R: Sync,
impl<R> Unpin for StaticDomain<R>where
R: Unpin,
impl<R> UnsafeUnpin for StaticDomain<R>
impl<R> UnwindSafe for StaticDomain<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<I> TryGroundInterpretation for Iwhere
I: GroundInterpretation,
impl<I> TryGroundInterpretation for Iwhere
I: GroundInterpretation,
Source§type Error = Infallible
type Error = Infallible
Error type.
Source§fn try_iri(
&self,
iri: &Iri,
) -> Result<Option<<I as Domain>::Resource>, <I as TryGroundInterpretation>::Error>
fn try_iri( &self, iri: &Iri, ) -> Result<Option<<I as Domain>::Resource>, <I as TryGroundInterpretation>::Error>
Interprets the given IRI, if possible.
Source§fn try_literal<'a>(
&self,
literal: impl Into<LiteralRef<'a>>,
) -> Result<Option<<I as Domain>::Resource>, <I as TryGroundInterpretation>::Error>
fn try_literal<'a>( &self, literal: impl Into<LiteralRef<'a>>, ) -> Result<Option<<I as Domain>::Resource>, <I as TryGroundInterpretation>::Error>
Interprets the given literal, if possible.
Source§fn try_ground_term<'a>(
&self,
term: impl Into<GroundTermRef<'a>>,
) -> Result<Option<<I as Domain>::Resource>, <I as TryGroundInterpretation>::Error>
fn try_ground_term<'a>( &self, term: impl Into<GroundTermRef<'a>>, ) -> Result<Option<<I as Domain>::Resource>, <I as TryGroundInterpretation>::Error>
Interprets the given ground term (an IRI or a literal), if possible.
Source§impl<I> TryGroundInterpretationMut for Iwhere
I: GroundInterpretationMut,
impl<I> TryGroundInterpretationMut for Iwhere
I: GroundInterpretationMut,
Source§fn try_insert_iri<'a>(
&mut self,
iri: impl Into<Cow<'a, Iri>>,
) -> Result<<I as Domain>::Resource, <I as TryGroundInterpretation>::Error>
fn try_insert_iri<'a>( &mut self, iri: impl Into<Cow<'a, Iri>>, ) -> Result<<I as Domain>::Resource, <I as TryGroundInterpretation>::Error>
Interprets the given IRI, inserting a fresh resource for it if none
exists yet.
Source§fn try_insert_literal<'a>(
&mut self,
literal: impl Into<CowLiteral<'a>>,
) -> Result<<I as Domain>::Resource, <I as TryGroundInterpretation>::Error>
fn try_insert_literal<'a>( &mut self, literal: impl Into<CowLiteral<'a>>, ) -> Result<<I as Domain>::Resource, <I as TryGroundInterpretation>::Error>
Interprets the given literal, inserting a fresh resource for it if
none exists yet.
Source§fn try_insert_ground_term<'a>(
&mut self,
term: impl Into<CowGroundTerm<'a>>,
) -> Result<<I as Domain>::Resource, <I as TryGroundInterpretation>::Error>
fn try_insert_ground_term<'a>( &mut self, term: impl Into<CowGroundTerm<'a>>, ) -> Result<<I as Domain>::Resource, <I as TryGroundInterpretation>::Error>
Interprets the given ground term, inserting a fresh resource for it
if none exists yet.
Source§impl<I> TryReverseGroundInterpretation for Iwhere
I: ReverseGroundInterpretation,
impl<I> TryReverseGroundInterpretation for Iwhere
I: ReverseGroundInterpretation,
Source§type TryIris<'a> = InfallibleIterator<MapIntoOwned<<I as ReverseGroundInterpretation>::Iris<'a>>>
where
I: 'a
type TryIris<'a> = InfallibleIterator<MapIntoOwned<<I as ReverseGroundInterpretation>::Iris<'a>>> where I: 'a
Iterator over the IRIs of a resource.
Source§type TryLiterals<'a> = InfallibleIterator<MapIntoOwned<<I as ReverseGroundInterpretation>::Literals<'a>>>
where
I: 'a
type TryLiterals<'a> = InfallibleIterator<MapIntoOwned<<I as ReverseGroundInterpretation>::Literals<'a>>> where I: 'a
Iterator over the literals of a resource.
Source§fn try_iris_of<'a>(
&'a self,
resource: &'a <I as Domain>::Resource,
) -> Result<<I as TryReverseGroundInterpretation>::TryIris<'a>, <I as TryGroundInterpretation>::Error>
fn try_iris_of<'a>( &'a self, resource: &'a <I as Domain>::Resource, ) -> Result<<I as TryReverseGroundInterpretation>::TryIris<'a>, <I as TryGroundInterpretation>::Error>
Returns an iterator over the IRIs of
resource.Source§fn try_literals_of<'a>(
&'a self,
resource: &'a <I as Domain>::Resource,
) -> Result<<I as TryReverseGroundInterpretation>::TryLiterals<'a>, <I as TryGroundInterpretation>::Error>
fn try_literals_of<'a>( &'a self, resource: &'a <I as Domain>::Resource, ) -> Result<<I as TryReverseGroundInterpretation>::TryLiterals<'a>, <I as TryGroundInterpretation>::Error>
Returns an iterator over the literals of
resource.Source§fn try_is_anonymous(
&self,
resource: &<I as Domain>::Resource,
) -> Result<bool, <I as TryGroundInterpretation>::Error>
fn try_is_anonymous( &self, resource: &<I as Domain>::Resource, ) -> Result<bool, <I as TryGroundInterpretation>::Error>
Checks whether
resource has no ground term lexical representation.Source§fn try_ground_terms_of<'a>(
&'a self,
resource: &'a Self::Resource,
) -> Result<TryGroundTermsOf<'a, Self>, Self::Error>
fn try_ground_terms_of<'a>( &'a self, resource: &'a Self::Resource, ) -> Result<TryGroundTermsOf<'a, Self>, Self::Error>
Returns an iterator over the ground terms (IRIs and literals) of
resource.