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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.