Struct wire_rs::WireCursor
source · pub struct WireCursor<'a> { /* private fields */ }Implementations
sourceimpl<'a> WireCursor<'a>
impl<'a> WireCursor<'a>
pub fn new(wire: &'a [u8]) -> Self
pub fn get_readable<T, const E: bool>(&mut self) -> Result<T, WireError>where
T: WireReadable,
pub fn get_readable_part<T, const L: usize, const E: bool>(
&mut self
) -> Result<T, WireError>where
T: PartWireReadable,
pub fn get_readable_ref<T, const E: bool>(
&mut self,
length: usize
) -> Result<&'a T, WireError>where
T: RefWireReadable + ?Sized,
pub fn get_readable_comp<T, const E: bool>(&mut self) -> Result<T, WireError>where
T: CompWireReadable<'a> + ?Sized,
pub fn advance(&mut self, amount: usize) -> Result<(), WireError>
pub fn advance_up_to(&mut self, amount: usize)
pub fn get(&mut self, amount: usize) -> Result<&'a [u8], WireError>
pub fn get_array<const L: usize>(&mut self) -> Result<&'a [u8; L], WireError>
pub fn is_empty(&self) -> bool
pub fn remaining(&self) -> usize
Trait Implementations
sourceimpl<'a> Clone for WireCursor<'a>
impl<'a> Clone for WireCursor<'a>
sourcefn clone(&self) -> WireCursor<'a>
fn clone(&self) -> WireCursor<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for WireCursor<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for WireCursor<'a>
impl<'a> Send for WireCursor<'a>
impl<'a> Sync for WireCursor<'a>
impl<'a> Unpin for WireCursor<'a>
impl<'a> UnwindSafe for WireCursor<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more