pub struct BencodeMut<'a> { /* private fields */ }
Expand description
BencodeMut
object that stores references to some data.
Implementations§
Source§impl<'a> BencodeMut<'a>
impl<'a> BencodeMut<'a>
Sourcepub fn new_int(value: i64) -> BencodeMut<'a>
pub fn new_int(value: i64) -> BencodeMut<'a>
Create a new BencodeMut
representing an i64
.
Sourcepub fn new_bytes(value: Cow<'a, [u8]>) -> BencodeMut<'a>
pub fn new_bytes(value: Cow<'a, [u8]>) -> BencodeMut<'a>
Create a new BencodeMut
representing a [u8]
.
Sourcepub fn new_list() -> BencodeMut<'a>
pub fn new_list() -> BencodeMut<'a>
Create a new BencodeMut
representing a BListAccess
.
Sourcepub fn new_dict() -> BencodeMut<'a>
pub fn new_dict() -> BencodeMut<'a>
Create a new BencodeMut
representing a BDictAccess
.
Trait Implementations§
Source§impl<'a> BMutAccess for BencodeMut<'a>
impl<'a> BMutAccess for BencodeMut<'a>
Source§fn kind_mut<'b>(&'b mut self) -> MutKind<'b, Cow<'a, [u8]>, BencodeMut<'a>>
fn kind_mut<'b>(&'b mut self) -> MutKind<'b, Cow<'a, [u8]>, BencodeMut<'a>>
Access the bencode as a
BencodeMutKind
.Source§fn list_mut(&mut self) -> Option<&mut dyn BListAccess<BencodeMut<'a>>>
fn list_mut(&mut self) -> Option<&mut dyn BListAccess<BencodeMut<'a>>>
Attempt to access the bencode as a mutable
BListAccess
.Source§fn dict_mut(
&mut self,
) -> Option<&mut dyn BDictAccess<Cow<'a, [u8]>, BencodeMut<'a>>>
fn dict_mut( &mut self, ) -> Option<&mut dyn BDictAccess<Cow<'a, [u8]>, BencodeMut<'a>>>
Attempt to access the bencode as a mutable
BDictAccess
.Source§impl<'a> BRefAccess for BencodeMut<'a>
impl<'a> BRefAccess for BencodeMut<'a>
type BKey = Cow<'a, [u8]>
type BType = BencodeMut<'a>
Source§fn kind<'b>(&'b self) -> RefKind<'b, Cow<'a, [u8]>, BencodeMut<'a>>
fn kind<'b>(&'b self) -> RefKind<'b, Cow<'a, [u8]>, BencodeMut<'a>>
Access the bencode as a
BencodeRefKind
.Source§fn list(&self) -> Option<&dyn BListAccess<BencodeMut<'a>>>
fn list(&self) -> Option<&dyn BListAccess<BencodeMut<'a>>>
Attempt to access the bencode as an
BListAccess
.Source§fn dict(&self) -> Option<&dyn BDictAccess<Cow<'a, [u8]>, BencodeMut<'a>>>
fn dict(&self) -> Option<&dyn BDictAccess<Cow<'a, [u8]>, BencodeMut<'a>>>
Attempt to access the bencode as an
BDictAccess
.Source§impl<'a> Clone for BencodeMut<'a>
impl<'a> Clone for BencodeMut<'a>
Source§fn clone(&self) -> BencodeMut<'a>
fn clone(&self) -> BencodeMut<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for BencodeMut<'a>
impl<'a> Debug for BencodeMut<'a>
Source§impl<'a> Hash for BencodeMut<'a>
impl<'a> Hash for BencodeMut<'a>
Source§impl<'a> PartialEq for BencodeMut<'a>
impl<'a> PartialEq for BencodeMut<'a>
impl<'a> Eq for BencodeMut<'a>
impl<'a> StructuralPartialEq for BencodeMut<'a>
Auto Trait Implementations§
impl<'a> Freeze for BencodeMut<'a>
impl<'a> RefUnwindSafe for BencodeMut<'a>
impl<'a> Send for BencodeMut<'a>
impl<'a> Sync for BencodeMut<'a>
impl<'a> Unpin for BencodeMut<'a>
impl<'a> UnwindSafe for BencodeMut<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more