pub struct Ref<T>(pub T);Expand description
Wrapper serializing its value as a reference: the subject is emitted as an object, without its own properties.
Tuple Fields§
§0: TTrait Implementations§
impl<T: Copy> Copy for Ref<T>
Source§impl<'de, T> Deserialize<'de> for Ref<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Ref<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq> Eq for Ref<T>
Source§impl<I: Interpretation, T: LinkedDataResource<I>> LinkedData<I> for Ref<T>
impl<I: Interpretation, T: LinkedDataResource<I>> LinkedData<I> for Ref<T>
Source§impl<I: Interpretation, T: LinkedDataResource<I>> LinkedDataGraph<I> for Ref<T>
impl<I: Interpretation, T: LinkedDataResource<I>> LinkedDataGraph<I> for Ref<T>
Source§fn visit_graph<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: GraphVisitor<I>,
fn visit_graph<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: GraphVisitor<I>,
Visits the subjects of the graph represented by this value.
Source§impl<I: Interpretation, T: LinkedDataResource<I>> LinkedDataPredicateObjects<I> for Ref<T>
impl<I: Interpretation, T: LinkedDataResource<I>> LinkedDataPredicateObjects<I> for Ref<T>
Source§fn visit_objects<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: PredicateObjectsVisitor<I>,
fn visit_objects<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: PredicateObjectsVisitor<I>,
Visits the objects this predicate points at.
Source§impl<I: Interpretation, T: LinkedDataResource<I>> LinkedDataResource<I> for Ref<T>
impl<I: Interpretation, T: LinkedDataResource<I>> LinkedDataResource<I> for Ref<T>
Source§fn interpretation(
&self,
interpretation: &mut I,
) -> ResourceInterpretation<'_, I>
fn interpretation( &self, interpretation: &mut I, ) -> ResourceInterpretation<'_, I>
Returns the interpretation of this resource, inserting it into
interpretation if required.Source§fn lexical_representation<'a>(
&'a self,
interpretation: &'a mut I,
) -> Option<CowRdfTerm<'a>>where
I: ReverseInterpretation + ReverseLocalInterpretation,
fn lexical_representation<'a>(
&'a self,
interpretation: &'a mut I,
) -> Option<CowRdfTerm<'a>>where
I: ReverseInterpretation + ReverseLocalInterpretation,
Returns the lexical term representing this resource, if any.
Source§fn reference_interpretation(
&self,
interpretation: &mut I,
) -> ResourceInterpretation<'_, I>
fn reference_interpretation( &self, interpretation: &mut I, ) -> ResourceInterpretation<'_, I>
Returns the interpretation to use when this resource appears as a
reference rather than as a subject with properties.
Source§impl<I: Interpretation, T> LinkedDataSubject<I> for Ref<T>
impl<I: Interpretation, T> LinkedDataSubject<I> for Ref<T>
Source§fn visit_subject<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: SubjectVisitor<I>,
fn visit_subject<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: SubjectVisitor<I>,
Visits the properties of the subject represented by this value.
Source§impl<T: Ord> Ord for Ref<T>
impl<T: Ord> Ord for Ref<T>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for Ref<T>
impl<T: PartialOrd> PartialOrd for Ref<T>
impl<T: PartialEq> StructuralPartialEq for Ref<T>
Auto Trait Implementations§
impl<T> Freeze for Ref<T>where
T: Freeze,
impl<T> RefUnwindSafe for Ref<T>where
T: RefUnwindSafe,
impl<T> Send for Ref<T>where
T: Send,
impl<T> Sync for Ref<T>where
T: Sync,
impl<T> Unpin for Ref<T>where
T: Unpin,
impl<T> UnsafeUnpin for Ref<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Ref<T>where
T: 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<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.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if
self is equivalent to key.