Enum benko::Benc[][src]

pub enum Benc {
    Int(BInt),
    Str(BStr),
    Vec(BVec),
    Map(BMap),
}

The nested Bencode structure container.

Variants

Int(BInt)
Str(BStr)
Vec(BVec)
Map(BMap)

Implementations

impl Benc[src]

pub fn bytes(&self) -> Vec<u8>[src]

parses the bencode object into a bencoded array of ascii bytes.

pub fn parse(bytes: &[u8]) -> ParseResult<Self>[src]

attempts to parse an array of ascii bytes into a bencode object.

Trait Implementations

impl Clone for Benc[src]

impl Debug for Benc[src]

impl Eq for Benc[src]

impl PartialEq<Benc> for Benc[src]

impl StructuralEq for Benc[src]

impl StructuralPartialEq for Benc[src]

impl UnwrapBenc<BMapImpl> for Benc[src]

impl UnwrapBenc<Vec<Benc, Global>> for Benc[src]

impl UnwrapBenc<Vec<u8, Global>> for Benc[src]

impl UnwrapBenc<usize> for Benc[src]

Auto Trait Implementations

impl RefUnwindSafe for Benc

impl Send for Benc

impl Sync for Benc

impl Unpin for Benc

impl UnwindSafe for Benc

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, 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, 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.