Enum serde_pickle::value::Value [−][src]
pub enum Value {
None,
Bool(bool),
I64(i64),
Int(BigInt),
F64(f64),
Bytes(Vec<u8>),
String(String),
List(Vec<Value>),
Tuple(Vec<Value>),
Set(BTreeSet<HashableValue>),
FrozenSet(BTreeSet<HashableValue>),
Dict(BTreeMap<HashableValue, Value>),
}
Expand description
Represents all primitive builtin Python values that can be restored by unpickling.
Note on integers: the distinction between the two types (short and long) is
very fuzzy in Python, and they can be used interchangeably. In Python 3,
all integers are long integers, so all are pickled as such. While decoding,
we simply put all integers that fit into an i64, and use BigInt
for the
rest.
Variants
None
Bool(bool)
Boolean
Tuple Fields of Bool
0: bool
I64(i64)
Short integer
Tuple Fields of I64
0: i64
Int(BigInt)
Long integer (unbounded length)
Tuple Fields of Int
0: BigInt
F64(f64)
Float
Tuple Fields of F64
0: f64
Bytestring
String(String)
Unicode string
Tuple Fields of String
0: String
List
Tuple
Set(BTreeSet<HashableValue>)
Set
Tuple Fields of Set
FrozenSet(BTreeSet<HashableValue>)
Frozen (immutable) set
Tuple Fields of FrozenSet
Dict(BTreeMap<HashableValue, Value>)
Dictionary (map)
Tuple Fields of Dict
0: BTreeMap<HashableValue, Value>
Implementations
Convert the value into a hashable version, if possible. If not, return a ValueNotHashable error.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more