pub struct ArcValue<D: Embeddable>(/* private fields */);
Expand description
A representation of a Preserves Value using Arc for reference-counting of subvalues.
Trait Implementations§
source§impl<D: Embeddable> Debug for ArcValue<D>
impl<D: Embeddable> Debug for ArcValue<D>
source§impl<D: Embeddable> NestedValue for ArcValue<D>
impl<D: Embeddable> NestedValue for ArcValue<D>
source§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 ArcValue<D>
impl<D: Ord + Embeddable> Ord for ArcValue<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: PartialOrd + Embeddable> PartialOrd for ArcValue<D>
impl<D: PartialOrd + Embeddable> PartialOrd for ArcValue<D>
impl<D: Eq + Embeddable> Eq for ArcValue<D>
impl<D: Embeddable> StructuralPartialEq for ArcValue<D>
Auto Trait Implementations§
impl<D> Freeze for ArcValue<D>
impl<D> RefUnwindSafe for ArcValue<D>where
D: RefUnwindSafe,
impl<D> Send for ArcValue<D>
impl<D> Sync for ArcValue<D>
impl<D> Unpin for ArcValue<D>
impl<D> UnwindSafe for ArcValue<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)