pub enum ESExpr {
Constructor {
name: String,
args: Vec<ESExpr>,
kwargs: HashMap<String, ESExpr>,
},
Bool(bool),
Int(BigInt),
Str(String),
Binary(Vec<u8>),
Float32(f32),
Float64(f64),
Null,
}Expand description
Representation of an ESExpr value. Must be one of a constructor, bool, int, string, binary, float32, float64, or null.
Variants§
Constructor
A constructor expression. Can contain positional and keyword arguments.
Fields
Bool(bool)
A bool value.
Int(BigInt)
An integer value.
Str(String)
A string value.
Binary(Vec<u8>)
A binary value.
Float32(f32)
A float32 value.
Float64(f64)
A float64 value.
Null
A Null value.
Implementations§
Trait Implementations§
source§impl ESExprCodec for ESExpr
impl ESExprCodec for ESExpr
The tags that this type is expected to be encoded as.
source§fn encode_esexpr(self) -> ESExpr
fn encode_esexpr(self) -> ESExpr
Encode this value into an expression.
source§fn decode_esexpr(expr: ESExpr) -> Result<Self, DecodeError>
fn decode_esexpr(expr: ESExpr) -> Result<Self, DecodeError>
Decode an expression into a value.
impl StructuralPartialEq for ESExpr
Auto Trait Implementations§
impl Freeze for ESExpr
impl RefUnwindSafe for ESExpr
impl Send for ESExpr
impl Sync for ESExpr
impl Unpin for ESExpr
impl UnwindSafe for ESExpr
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)