pub struct Value(/* private fields */);Expand description
The universal runtime handle for every object.
A Value is a reference-counted handle to a RuntimeObject; it is the
object end of the data flow tokens -> checked forms -> objects -> checked calls -> objects -> encoded forms. Equality and hashing are by object
identity (pointer), not by structural contents.
§Examples
// Every value exposes its object and that object's header.
let header = value.header();
let _same = value.object().header();
let _ = header;Implementations§
Source§impl Value
impl Value
Sourcepub fn object(&self) -> &(dyn RuntimeObject + 'static)
pub fn object(&self) -> &(dyn RuntimeObject + 'static)
Borrows the underlying runtime object.
Sourcepub fn header(&self) -> &ObjectHeader
pub fn header(&self) -> &ObjectHeader
Borrows the object’s ObjectHeader.
Trait Implementations§
impl Eq for Value
Auto Trait Implementations§
impl !RefUnwindSafe for Value
impl !UnwindSafe for Value
impl Freeze for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
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