pub enum Value {
Bytes(Vec<u8>),
Int(i64),
List(Vec<Value>),
Dict(HashMap<Vec<u8>, Value>),
}Expand description
All possible values which may be serialized in bencode.
Variants§
Bytes(Vec<u8>)
A generic list of bytes.
Int(i64)
An integer.
List(Vec<Value>)
A list of other bencoded values.
Dict(HashMap<Vec<u8>, Value>)
A map of (key, value) pairs.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<D>(deserializer: D) -> Result<Value, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Value, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Value
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnwindSafe for Value
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