Trait bip_bencode::BRefAccess [] [src]

pub trait BRefAccess<'a>: Sized {
    type BType: BRefAccess<'a>;
    fn kind<'b>(&'b self) -> BencodeRefKind<'b, 'a, Self::BType>;
    fn str(&self) -> Option<&'a str>;
    fn int(&self) -> Option<i64>;
    fn bytes(&self) -> Option<&'a [u8]>;
    fn list(&self) -> Option<&BListAccess<Self::BType>>;
    fn dict(&self) -> Option<&BDictAccess<'a, Self::BType>>;
}

Trait for read access to some bencode type.

Associated Types

Required Methods

Access the bencode as a BencodeRefKind.

Attempt to access the bencode as a str.

Attempt to access the bencode as an i64.

Attempt to access the bencode as an [u8].

Attempt to access the bencode as an BListAccess.

Attempt to access the bencode as an BDictAccess.

Implementors