pub struct Buffer<'l> { /* private fields */ }Implementations§
Source§impl<'l> Buffer<'l>
impl<'l> Buffer<'l>
pub const fn new(buffer: &'l [u8]) -> Buffer<'l>
pub const fn remaining(&self) -> usize
pub const fn size(&self) -> usize
pub const fn empty(&self) -> bool
pub const fn set_offset(self, o: usize) -> Option<Self>
pub const fn skip(self, s: usize) -> Option<Self>
pub fn get_u8(&mut self) -> Option<u8>
pub fn peek_u8(&self) -> Option<u8>
pub fn get_bytes(&mut self, b: usize) -> Option<&'l [u8]>
pub fn get_buffer(&mut self, b: usize) -> Option<Buffer<'l>>
pub fn get_vec(&mut self, b: usize) -> Option<Vec<u8>>
pub fn get_be16(&mut self) -> Option<u16>
pub fn get_be32(&mut self) -> Option<u32>
pub fn get_ipv4(&mut self) -> Option<Ipv4Addr>
pub fn get_tlv(&mut self) -> Option<(u8, &[u8])>
pub fn get_domains(&mut self) -> Option<Vec<Vec<String>>>
Trait Implementations§
Auto Trait Implementations§
impl<'l> Freeze for Buffer<'l>
impl<'l> RefUnwindSafe for Buffer<'l>
impl<'l> Send for Buffer<'l>
impl<'l> Sync for Buffer<'l>
impl<'l> Unpin for Buffer<'l>
impl<'l> UnsafeUnpin for Buffer<'l>
impl<'l> UnwindSafe for Buffer<'l>
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