pub struct ListReader<'b, 'r> { /* private fields */ }Implementations§
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
pub fn len(&self) -> u32
pub fn is_empty(&self) -> bool
pub fn get(&self, index: u32) -> Result<Ref<'b, 'r>>
pub fn iter(&self) -> impl Iterator<Item = Result<Ref<'b, 'r>>> + '_
Sourcepub fn as_u8_slice(&self) -> Result<&'b [u8]>
pub fn as_u8_slice(&self) -> Result<&'b [u8]>
Borrow a list<u8> as a slice of the message buffer — no copy, no
conversion.
u8 is the one numeric element type with no endianness and no
alignment to satisfy, so it is the only one that can be handed back as a
borrow. Every wider type needs a little-endian decode, which safe Rust
cannot do in place; use the copy_* / to_vec_* methods for those.
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Source§impl<'b, 'r> ListReader<'b, 'r>
impl<'b, 'r> ListReader<'b, 'r>
Trait Implementations§
Source§impl<'b, 'r> Clone for ListReader<'b, 'r>
impl<'b, 'r> Clone for ListReader<'b, 'r>
Source§fn clone(&self) -> ListReader<'b, 'r>
fn clone(&self) -> ListReader<'b, 'r>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'b, 'r> !RefUnwindSafe for ListReader<'b, 'r>
impl<'b, 'r> !Send for ListReader<'b, 'r>
impl<'b, 'r> !Sync for ListReader<'b, 'r>
impl<'b, 'r> !UnwindSafe for ListReader<'b, 'r>
impl<'b, 'r> Freeze for ListReader<'b, 'r>
impl<'b, 'r> Unpin for ListReader<'b, 'r>
impl<'b, 'r> UnsafeUnpin for ListReader<'b, 'r>
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