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>),
}

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

Boolean

Short integer

Long integer (unbounded length)

Float

Bytestring

Unicode string

List

Tuple

Set

Frozen (immutable) set

Dictionary (map)

Methods

impl Value
[src]

Convert the value into a hashable version, if possible. If not, return a ValueNotHashable error.

Trait Implementations

impl Clone for Value
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Value
[src]

Formats the value using the given formatter.

impl PartialEq for Value
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Display for Value
[src]

Formats the value using the given formatter.

impl Deserialize for Value
[src]

Deserialize this value from the given Serde deserializer. Read more