pub struct RcValue<D: Embeddable>(/* private fields */);
Expand description
A representation of a Preserves Value using Rc for reference-counting of subvalues.
Trait Implementations§
source§impl<D: Embeddable> Debug for RcValue<D>
impl<D: Embeddable> Debug for RcValue<D>
source§impl<D: Embeddable> NestedValue for RcValue<D>
impl<D: Embeddable> NestedValue for RcValue<D>
§type Embedded = D
type Embedded = D
Every representation of Preserves values has an associated type: that of the Rust data
able to be embedded inside a value.
source§fn wrap(anns: Annotations<Self>, v: Value<Self>) -> Self
fn wrap(anns: Annotations<Self>, v: Value<Self>) -> Self
Attaches the given Annotations to the Value.
source§fn annotations(&self) -> &Annotations<Self>
fn annotations(&self) -> &Annotations<Self>
Retrieves any annotations attached to
self
.source§fn pieces(self) -> (Annotations<Self>, Value<Self>)
fn pieces(self) -> (Annotations<Self>, Value<Self>)
Consumes
self
, yielding its annotations and underlying Value.source§fn value_owned(self) -> Value<Self>
fn value_owned(self) -> Value<Self>
Consumes
self
, yielding its underlying Value and discarding its annotations.source§fn value_class(&self) -> ValueClass
fn value_class(&self) -> ValueClass
Retrieves the ValueClass of
self
.source§fn debug_fmt(&self, f: &mut Formatter<'_>) -> Result
fn debug_fmt(&self, f: &mut Formatter<'_>) -> Result
Supplies an opportunity to customize debug formatting for
self
. Defaults to writing
@
-prefixed annotations followed by the underlying value.source§fn strip_annotations<M: NestedValue<Embedded = Self::Embedded>>(&self) -> M
fn strip_annotations<M: NestedValue<Embedded = Self::Embedded>>(&self) -> M
Yields a deep copy of
self
with all annotations (recursively) removed.source§impl<D: Ord + Embeddable> Ord for RcValue<D>
impl<D: Ord + Embeddable> Ord for RcValue<D>
1.21.0 · 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<D: PartialEq + Embeddable> PartialEq for RcValue<D>
impl<D: PartialEq + Embeddable> PartialEq for RcValue<D>
source§impl<D: PartialOrd + Embeddable> PartialOrd for RcValue<D>
impl<D: PartialOrd + Embeddable> PartialOrd for RcValue<D>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<D: Eq + Embeddable> Eq for RcValue<D>
impl<D: Embeddable> StructuralPartialEq for RcValue<D>
Auto Trait Implementations§
impl<D> Freeze for RcValue<D>
impl<D> RefUnwindSafe for RcValue<D>where
D: RefUnwindSafe,
impl<D> !Send for RcValue<D>
impl<D> !Sync for RcValue<D>
impl<D> Unpin for RcValue<D>
impl<D> UnwindSafe for RcValue<D>where
D: RefUnwindSafe,
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