Enum bip_bencode::Bencode [] [src]

pub enum Bencode<'a> {
    Int(i64),
    Bytes(&'a [u8]),
    List(Vec<Bencode<'a>>),
    Dict(BTreeMap<&'a [u8], Bencode<'a>>),
}

Bencode object that holds references to the underlying data.

Variants

Bencode Integer.

Bencode Bytes.

Bencode List.

Bencode Dictionary.

Methods

impl<'a> Bencode<'a>
[src]

Trait Implementations

impl<'a> Debug for Bencode<'a>
[src]

Formats the value using the given formatter.

impl<'a> Eq for Bencode<'a>
[src]

impl<'a> PartialEq for Bencode<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Clone for Bencode<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Hash for Bencode<'a>
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.