pub struct Value<L: 'static> { /* private fields */ }
Expand description
An abstract value type that is tracked by a cyclic garbage collector.
Call gcmodule::collect_thread_cycles
to collect cycles and reclaim space.
Implementations§
Source§impl<L: Interpreter> Value<L>
impl<L: Interpreter> Value<L>
Sourcepub fn new<T: AbstractValue<L> + Sized>(value: T) -> Self
pub fn new<T: AbstractValue<L> + Sized>(value: T) -> Self
Create a new Value
.
Sourcepub fn downcast_ref<T: AbstractValue<L> + Sized>(&self) -> Option<&T>
pub fn downcast_ref<T: AbstractValue<L> + Sized>(&self) -> Option<&T>
Attempt to downcast.
Trait Implementations§
Source§impl<L: Interpreter> Debug for Value<L>
impl<L: Interpreter> Debug for Value<L>
Source§impl<L: Interpreter> Display for Value<L>
impl<L: Interpreter> Display for Value<L>
Auto Trait Implementations§
impl<L> Freeze for Value<L>
impl<L> !RefUnwindSafe for Value<L>
impl<L> !Send for Value<L>
impl<L> !Sync for Value<L>
impl<L> Unpin for Value<L>
impl<L> !UnwindSafe for Value<L>
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