pub enum ObjectEncoding {
Constructor {
class: Symbol,
args: Vec<Expr>,
},
TaggedData {
tag: Symbol,
fields: Vec<(Symbol, Expr)>,
},
Opaque {
class: Symbol,
stable_id: String,
},
}Expand description
How an object presents itself to a codec for encoding.
The kernel defines these encoding shapes; a codec turns the chosen shape into concrete output.
Variants§
Constructor
Encode as a constructor call of class with argument expressions.
TaggedData
Encode as tagged data with named fields.
Opaque
Encode as an opaque reference identified by a stable id.
Trait Implementations§
Source§impl Clone for ObjectEncoding
impl Clone for ObjectEncoding
Source§fn clone(&self) -> ObjectEncoding
fn clone(&self) -> ObjectEncoding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObjectEncoding
impl Debug for ObjectEncoding
impl Eq for ObjectEncoding
Source§impl PartialEq for ObjectEncoding
impl PartialEq for ObjectEncoding
Source§fn eq(&self, other: &ObjectEncoding) -> bool
fn eq(&self, other: &ObjectEncoding) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ObjectEncoding
Auto Trait Implementations§
impl Freeze for ObjectEncoding
impl RefUnwindSafe for ObjectEncoding
impl Send for ObjectEncoding
impl Sync for ObjectEncoding
impl Unpin for ObjectEncoding
impl UnsafeUnpin for ObjectEncoding
impl UnwindSafe for ObjectEncoding
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