[−][src]Enum serde_pickle::value::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
Bool(bool)
Boolean
I64(i64)
Short integer
Int(BigInt)
Long integer (unbounded length)
F64(f64)
Float
Bytestring
String(String)
Unicode string
List
Tuple
Set(BTreeSet<HashableValue>)
Set
FrozenSet(BTreeSet<HashableValue>)
Frozen (immutable) set
Dict(BTreeMap<HashableValue, Value>)
Dictionary (map)
Implementations
impl Value
[src]
pub fn into_hashable(self) -> Result<HashableValue, Error>
[src]
Convert the value into a hashable version, if possible. If not, return a ValueNotHashable error.
Trait Implementations
impl Clone for Value
[src]
impl Debug for Value
[src]
impl<'de> Deserialize<'de> for Value
[src]
fn deserialize<D: Deserializer<'de>>(deser: D) -> StdResult<Value, D::Error>
[src]
impl Display for Value
[src]
impl PartialEq<Value> for Value
[src]
impl StructuralPartialEq for Value
[src]
Auto Trait Implementations
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,