pub struct OctetsPtr(/* private fields */);Expand description
A (safe) raw pointer to an pinned Octets.
Methods from Deref<Target = Octets<'static>>§
Sourcepub fn get_u8(&mut self) -> Result<u8>
pub fn get_u8(&mut self) -> Result<u8>
Reads an unsigned 8-bit integer from the current offset and advances the buffer.
Sourcepub fn peek_u8(&mut self) -> Result<u8>
pub fn peek_u8(&mut self) -> Result<u8>
Reads an unsigned 8-bit integer from the current offset without advancing the buffer.
Sourcepub fn get_u16(&mut self) -> Result<u16>
pub fn get_u16(&mut self) -> Result<u16>
Reads an unsigned 16-bit integer in network byte-order from the current offset and advances the buffer.
Sourcepub fn get_u24(&mut self) -> Result<u32>
pub fn get_u24(&mut self) -> Result<u32>
Reads an unsigned 24-bit integer in network byte-order from the current offset and advances the buffer.
Sourcepub fn get_u32(&mut self) -> Result<u32>
pub fn get_u32(&mut self) -> Result<u32>
Reads an unsigned 32-bit integer in network byte-order from the current offset and advances the buffer.
Sourcepub fn get_u64(&mut self) -> Result<u64>
pub fn get_u64(&mut self) -> Result<u64>
Reads an unsigned 64-bit integer in network byte-order from the current offset and advances the buffer.
Sourcepub fn get_varint(&mut self) -> Result<u64>
pub fn get_varint(&mut self) -> Result<u64>
Reads an unsigned variable-length integer in network byte-order from the current offset and advances the buffer.
Sourcepub fn get_bytes(&mut self, len: usize) -> Result<Octets<'a>>
pub fn get_bytes(&mut self, len: usize) -> Result<Octets<'a>>
Reads len bytes from the current offset without copying and advances
the buffer.
Sourcepub fn get_bytes_with_u8_length(&mut self) -> Result<Octets<'a>>
pub fn get_bytes_with_u8_length(&mut self) -> Result<Octets<'a>>
Reads len bytes from the current offset without copying and advances
the buffer, where len is an unsigned 8-bit integer prefix.
Sourcepub fn get_bytes_with_u16_length(&mut self) -> Result<Octets<'a>>
pub fn get_bytes_with_u16_length(&mut self) -> Result<Octets<'a>>
Reads len bytes from the current offset without copying and advances
the buffer, where len is an unsigned 16-bit integer prefix in network
byte-order.
Sourcepub fn get_bytes_with_varint_length(&mut self) -> Result<Octets<'a>>
pub fn get_bytes_with_varint_length(&mut self) -> Result<Octets<'a>>
Reads len bytes from the current offset without copying and advances
the buffer, where len is an unsigned variable-length integer prefix
in network byte-order.
Sourcepub fn peek_bytes(&self, len: usize) -> Result<Octets<'a>>
pub fn peek_bytes(&self, len: usize) -> Result<Octets<'a>>
Reads len bytes from the current offset without copying and without
advancing the buffer.
Sourcepub fn slice(&'a self, len: usize) -> Result<&'a [u8]>
pub fn slice(&'a self, len: usize) -> Result<&'a [u8]>
Returns a slice of len elements from the current offset.
Sourcepub fn slice_last(&'a self, len: usize) -> Result<&'a [u8]>
pub fn slice_last(&'a self, len: usize) -> Result<&'a [u8]>
Returns a slice of len elements from the end of the buffer.