Enum rdest::BValue[][src]

pub enum BValue {
    Int(i64),
    ByteStr(Vec<u8>),
    List(Vec<BValue>),
    Dict(HashMap<Vec<u8>, BValue>),
}

Bencode representation. BEP3 specify four basic types: integer, string (but can be any byte array), list and dictionary.

Variants

Int(i64)

Integer representation. BEP3 doesn’t specify max/min limit, so in this implementation i64 was used, and should be sufficient.

ByteStr(Vec<u8>)

String representation, more precisely this can be any u8 array.

List(Vec<BValue>)

List of BValue values

Dict(HashMap<Vec<u8>, BValue>)

Dictionary where, key and value are both BValues (key can be dictionary itself).

Trait Implementations

impl Clone for BValue[src]

impl Debug for BValue[src]

impl Display for BValue[src]

impl PartialEq<BValue> for BValue[src]

impl StructuralPartialEq for BValue[src]

Auto Trait Implementations

impl RefUnwindSafe for BValue

impl Send for BValue

impl Sync for BValue

impl Unpin for BValue

impl UnwindSafe for BValue

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.