Struct bt_bencode::read::SliceRead
source · pub struct SliceRead<'a> { /* private fields */ }
Expand description
A wrapper to implement this crate’s Read trait for byte slices.
Implementations§
Trait Implementations§
source§impl<'a> Read<'a> for SliceRead<'a>
impl<'a> Read<'a> for SliceRead<'a>
source§fn peek(&mut self) -> Option<Result<u8>>
fn peek(&mut self) -> Option<Result<u8>>
Returns the next byte but does not consume. Read more
source§fn byte_offset(&self) -> usize
fn byte_offset(&self) -> usize
Returns the position in the stream of bytes.
source§fn parse_byte_str<'b>(
&'b mut self,
_buf: &'b mut Vec<u8>
) -> Result<Ref<'a, 'b, [u8]>>
fn parse_byte_str<'b>( &'b mut self, _buf: &'b mut Vec<u8> ) -> Result<Ref<'a, 'b, [u8]>>
Returns the next slice of data for the given length. Read more
source§fn parse_raw_integer<'b>(
&'b mut self,
_buf: &'b mut Vec<u8>
) -> Result<Ref<'a, 'b, [u8]>>
fn parse_raw_integer<'b>( &'b mut self, _buf: &'b mut Vec<u8> ) -> Result<Ref<'a, 'b, [u8]>>
Consumes and returns the next integer raw encoding. Read more
source§fn parse_raw_byte_str<'b>(
&mut self,
_buf: &'b mut Vec<u8>
) -> Result<Ref<'a, 'b, [u8]>>
fn parse_raw_byte_str<'b>( &mut self, _buf: &'b mut Vec<u8> ) -> Result<Ref<'a, 'b, [u8]>>
Consumes and returns the next byte string raw encoding. Read more
Auto Trait Implementations§
impl<'a> Freeze for SliceRead<'a>
impl<'a> RefUnwindSafe for SliceRead<'a>
impl<'a> Send for SliceRead<'a>
impl<'a> Sync for SliceRead<'a>
impl<'a> Unpin for SliceRead<'a>
impl<'a> UnwindSafe for SliceRead<'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