pub trait BRefAccess: Sized {
type BKey;
type BType: BRefAccess<BKey = Self::BKey>;
// Required methods
fn kind(&self) -> RefKind<'_, Self::BKey, Self::BType>;
fn str(&self) -> Option<&str>;
fn int(&self) -> Option<i64>;
fn bytes(&self) -> Option<&[u8]>;
fn list(&self) -> Option<&dyn BListAccess<Self::BType>>;
fn dict(&self) -> Option<&dyn BDictAccess<Self::BKey, Self::BType>>;
}Expand description
Trait for read access to some bencode type.
Required Associated Types§
Required Methods§
sourcefn list(&self) -> Option<&dyn BListAccess<Self::BType>>
fn list(&self) -> Option<&dyn BListAccess<Self::BType>>
Attempt to access the bencode as an BListAccess.