Struct benko::BMapImpl [−][src]
Implementation: A HashMap wrapper that clones the contained Benc items when self.get() is called to avoid causing a move on the un-Copy-able type Benc.
Implementations
impl BMapImpl
[src]
pub fn get(&self, key: &BStr) -> Option<Benc>
[src]
pub fn insert(&mut self, key: BStr, val: Benc)
[src]
pub fn contains_key(&self, key: &BStr) -> bool
[src]
pub fn new() -> Self
[src]
pub fn len(&self) -> usize
[src]
pub fn items(&self) -> Vec<(BStr, Benc)>
[src]
Trait Implementations
impl Clone for BMapImpl
[src]
impl Debug for BMapImpl
[src]
impl EncodeBencode<BMapImpl> for BMap
[src]
impl Eq for BMapImpl
[src]
impl ParseBenc<BMapImpl> for BMap
[src]
fn parse_with_offset(bytes: &[u8]) -> ParseResult<(Self, usize)>
[src]
fn parse(bytes: &[u8]) -> ParseResult<Self>
[src]
impl PartialEq<BMapImpl> for BMapImpl
[src]
impl StructuralEq for BMapImpl
[src]
impl StructuralPartialEq for BMapImpl
[src]
impl UnwrapBenc<BMapImpl> for Benc
[src]
fn try_unwrap_benc(self) -> UnwrapResult<BMap>
[src]
fn unwrap_benc(self) -> BMap
[src]
Auto Trait Implementations
impl RefUnwindSafe for BMapImpl
impl Send for BMapImpl
impl Sync for BMapImpl
impl Unpin for BMapImpl
impl UnwindSafe for BMapImpl
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,