pub enum PickleValue {
None,
Bool(bool),
Int(i64),
Float(f64),
String(String),
Bytes(Vec<u8>),
List(Vec<PickleValue>),
Dict(Vec<(PickleValue, PickleValue)>),
}Expand description
A pickle value.
Variants§
None
Bool(bool)
Int(i64)
Float(f64)
String(String)
Bytes(Vec<u8>)
List(Vec<PickleValue>)
Dict(Vec<(PickleValue, PickleValue)>)
Implementations§
Source§impl PickleValue
impl PickleValue
Sourcepub fn as_list(&self) -> Option<&[PickleValue]>
pub fn as_list(&self) -> Option<&[PickleValue]>
Get as list reference if this is a List variant.
Sourcepub fn get(&self, key: &str) -> Option<&PickleValue>
pub fn get(&self, key: &str) -> Option<&PickleValue>
Look up a key in a Dict by string key.
Trait Implementations§
Source§impl Clone for PickleValue
impl Clone for PickleValue
Source§fn clone(&self) -> PickleValue
fn clone(&self) -> PickleValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 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