#[non_exhaustive]pub enum Object {
Show 18 variants
Null,
None,
False,
True,
StopIteration,
Ellipsis,
Int(u32),
BinaryFloat(f64),
BinaryComplex((f64, f64)),
String {
typ: StringType,
bytes: Vec<u8>,
},
Tuple(Vec<Object>),
List(Vec<Object>),
Set(Vec<Object>),
FrozenSet(Vec<Object>),
Dict(Vec<(Object, Object)>),
Long(BigInt),
Ref(u32),
Code(Box<CodeObject>),
}
Expand description
§Python objects as represented in the binary “marshal” format
This enum represents Python objects as they are represented in the binary “marshal” format.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Null
null object
None
None
singleton object
False
False
object
True
True
object
StopIteration
StopIteration
singleton
Ellipsis
...
(ellipsis) singleton
Int(u32)
32-bit integer
BinaryFloat(f64)
64-bit floating-point number
BinaryComplex((f64, f64))
64-bit floating-point complex number
String
string
Tuple(Vec<Object>)
tuple object (collection of objects)
List(Vec<Object>)
list object (collection of objects)
Set(Vec<Object>)
set object (collection of objects)
FrozenSet(Vec<Object>)
frozenset object (collection of objects)
Dict(Vec<(Object, Object)>)
dict object (collection of objects in key / value pairs)
Long(BigInt)
dynamically-sized integer
Ref(u32)
reference object
Code(Box<CodeObject>)
code object
Trait Implementations§
impl StructuralPartialEq for Object
Auto Trait Implementations§
impl Freeze for Object
impl RefUnwindSafe for Object
impl Send for Object
impl Sync for Object
impl Unpin for Object
impl UnwindSafe for Object
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