pub struct WireDecoder<'a> {
pub data: &'a [u8],
}Fields§
§data: &'a [u8]Implementations§
Source§impl<'a> WireDecoder<'a>
impl<'a> WireDecoder<'a>
pub fn new(data: &'a [u8]) -> WireDecoder<'a>
Sourcepub fn read_var_uint32(&mut self) -> Result<u32, DecodeError>
pub fn read_var_uint32(&mut self) -> Result<u32, DecodeError>
Read a VARINT uint32 from the data slice and move data
by the amount of read bytes.
Sourcepub fn read_var_uint64(&mut self) -> Result<u64, DecodeError>
pub fn read_var_uint64(&mut self) -> Result<u64, DecodeError>
Read a VARINT uint64 from the data slice and move data
by the amount of read bytes.
Sourcepub fn read_fixed32(&mut self) -> Result<u32, DecodeError>
pub fn read_fixed32(&mut self) -> Result<u32, DecodeError>
Read fixed sized u32 from the data slice and move data
by the amount of read bytes.
Sourcepub fn read_fixed64(&mut self) -> Result<u64, DecodeError>
pub fn read_fixed64(&mut self) -> Result<u64, DecodeError>
Read fixed sized u64 from the data slice and move data
by the amount of read bytes.
Sourcepub fn read_float(&mut self) -> Result<f32, DecodeError>
pub fn read_float(&mut self) -> Result<f32, DecodeError>
Read double from the data slice and move data
by the amount of read bytes.
Sourcepub fn read_double(&mut self) -> Result<f64, DecodeError>
pub fn read_double(&mut self) -> Result<f64, DecodeError>
Read double from the data slice and move data
by the amount of read bytes.
pub fn take_byte(&mut self) -> Result<u8, DecodeError>
pub fn take_4bytes(&mut self) -> Result<[u8; 4], DecodeError>
pub fn take_8bytes(&mut self) -> Result<[u8; 8], DecodeError>
pub fn take_nbyte(&mut self, n: usize) -> Result<&'a [u8], DecodeError>
Trait Implementations§
Source§impl<'a> Clone for WireDecoder<'a>
impl<'a> Clone for WireDecoder<'a>
Source§fn clone(&self) -> WireDecoder<'a>
fn clone(&self) -> WireDecoder<'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 WireDecoder<'a>
impl<'a> Debug for WireDecoder<'a>
Source§impl<'a> Hash for WireDecoder<'a>
impl<'a> Hash for WireDecoder<'a>
Source§impl<'a> Ord for WireDecoder<'a>
impl<'a> Ord for WireDecoder<'a>
Source§fn cmp(&self, other: &WireDecoder<'a>) -> Ordering
fn cmp(&self, other: &WireDecoder<'a>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a> PartialEq for WireDecoder<'a>
impl<'a> PartialEq for WireDecoder<'a>
Source§impl<'a> PartialOrd for WireDecoder<'a>
impl<'a> PartialOrd for WireDecoder<'a>
impl<'a> Eq for WireDecoder<'a>
impl<'a> StructuralPartialEq for WireDecoder<'a>
Auto Trait Implementations§
impl<'a> Freeze for WireDecoder<'a>
impl<'a> RefUnwindSafe for WireDecoder<'a>
impl<'a> Send for WireDecoder<'a>
impl<'a> Sync for WireDecoder<'a>
impl<'a> Unpin for WireDecoder<'a>
impl<'a> UnwindSafe for WireDecoder<'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