pub enum Context<'a, I: Interpretation> {
Subject,
Predicate {
subject: ResourceOrIriRef<'a, I>,
},
Object {
subject: ResourceOrIriRef<'a, I>,
predicate: ResourceOrIriRef<'a, I>,
},
}Expand description
Position a value occupies while being visited, used to report errors.
Variants§
Subject
The value is a subject.
Predicate
The value is a predicate of the given subject.
Fields
§
subject: ResourceOrIriRef<'a, I>Subject the predicate belongs to.
Object
The value is an object of the given subject and predicate.
Fields
§
subject: ResourceOrIriRef<'a, I>Subject the object belongs to.
§
predicate: ResourceOrIriRef<'a, I>Predicate the object belongs to.
Implementations§
Source§impl<'a, I: Interpretation> Context<'a, I>
impl<'a, I: Interpretation> Context<'a, I>
Sourcepub fn with_subject(self, subject: &'a I::Resource) -> Self
pub fn with_subject(self, subject: &'a I::Resource) -> Self
Moves this context into the predicate position of subject.
Sourcepub fn with_predicate(self, predicate: &'a I::Resource) -> Self
pub fn with_predicate(self, predicate: &'a I::Resource) -> Self
Moves this context into the object position of predicate.
Sourcepub fn with_predicate_iri(self, predicate: Iri<&'a str>) -> Self
pub fn with_predicate_iri(self, predicate: Iri<&'a str>) -> Self
Moves this context into the object position of the predicate IRI.
Sourcepub fn with_anonymous_predicate(self) -> Self
pub fn with_anonymous_predicate(self) -> Self
Moves this context into the object position of an anonymous predicate.
Sourcepub fn into_iris(self, interpretation: &I) -> ContextIriswhere
I: ReverseInterpretation,
pub fn into_iris(self, interpretation: &I) -> ContextIriswhere
I: ReverseInterpretation,
Resolves the resources of this context into IRIs.
Trait Implementations§
Source§impl<'a, I: Interpretation> Clone for Context<'a, I>where
ResourceOrIriRef<'a, I>: Clone,
impl<'a, I: Interpretation> Clone for Context<'a, I>where
ResourceOrIriRef<'a, I>: Clone,
impl<'a, I: Interpretation> Copy for Context<'a, I>
Source§impl<'a, I: Interpretation> Debug for Context<'a, I>
impl<'a, I: Interpretation> Debug for Context<'a, I>
Auto Trait Implementations§
impl<'a, I> Freeze for Context<'a, I>
impl<'a, I> RefUnwindSafe for Context<'a, I>
impl<'a, I> Send for Context<'a, I>
impl<'a, I> Sync for Context<'a, I>
impl<'a, I> Unpin for Context<'a, I>
impl<'a, I> UnsafeUnpin for Context<'a, I>
impl<'a, I> UnwindSafe for Context<'a, I>
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<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.