pub enum PickleValue {
None,
Bool(bool),
Int(i64),
Float(f64),
String(String),
List(Vec<PickleValue>),
Dict(HashMap<String, PickleValue>),
Bytes(Vec<u8>),
Unsupported(String),
}Expand description
Simplified representation of pickle data
This enum provides a JSON-like structure that’s easier to work with than the internal pickle Object type.
Variants§
None
None/null value
Bool(bool)
Boolean value
Int(i64)
Integer value
Float(f64)
Floating point value
String(String)
String value
List(Vec<PickleValue>)
List/array of values
Dict(HashMap<String, PickleValue>)
Dictionary/map of string keys to values
Bytes(Vec<u8>)
Binary data
Unsupported(String)
A value the reader cannot represent, holding the name of its Python type: a tensor
or storage, a class such as torch.float32, an object it does not interpret
(numpy.core.multiarray.scalar, torch.device), or an int too wide for an i64.
Trait Implementations§
Source§impl Clone for PickleValue
impl Clone for PickleValue
Source§impl Debug for PickleValue
impl Debug for PickleValue
Source§impl PartialEq for PickleValue
impl PartialEq for PickleValue
impl StructuralPartialEq for PickleValue
Auto Trait Implementations§
impl Freeze for PickleValue
impl RefUnwindSafe for PickleValue
impl Send for PickleValue
impl Sync for PickleValue
impl Unpin for PickleValue
impl UnsafeUnpin for PickleValue
impl UnwindSafe for PickleValue
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