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
type BType: BRefAccess<'a>
Required Methods
fn kind<'b>(&'b self) -> BencodeRefKind<'b, 'a, Self::BType>
Access the bencode as a BencodeRefKind
.
fn str(&self) -> Option<&'a str>
Attempt to access the bencode as a str
.
fn int(&self) -> Option<i64>
Attempt to access the bencode as an i64
.
fn bytes(&self) -> Option<&'a [u8]>
Attempt to access the bencode as an [u8]
.
fn list(&self) -> Option<&BListAccess<Self::BType>>
Attempt to access the bencode as an BListAccess
.
fn dict(&self) -> Option<&BDictAccess<'a, Self::BType>>
Attempt to access the bencode as an BDictAccess
.
Implementors
impl<'a: 'b, 'b, T> BRefAccess<'a> for &'b T where
T: BRefAccess<'a>,impl<'a> BRefAccess<'a> for BencodeMut<'a>
impl<'a> BRefAccess<'a> for BencodeRef<'a>