pub struct ListWalker<'a> { /* private fields */ }Expand description
Walks an indexed list without allocating.
The core-tier counterpart to List<T>, which needs alloc because it
materialises every element. This yields borrowed spans instead, so an embedded consumer can
reach one map’s events, or one actor’s name, without a heap.
Implementations§
Source§impl<'a> ListWalker<'a>
impl<'a> ListWalker<'a>
Sourcepub fn new(
body: &'a [u8],
base: u32,
ctx: &mut Ctx<'_>,
struct_name: &'static str,
) -> Self
pub fn new( body: &'a [u8], base: u32, ctx: &mut Ctx<'_>, struct_name: &'static str, ) -> Self
Start walking the list in a chunk payload.
struct_name names the element type, and is only used to locate diagnostics.
Trait Implementations§
Source§impl<'a> Clone for ListWalker<'a>
impl<'a> Clone for ListWalker<'a>
Auto Trait Implementations§
impl<'a> Freeze for ListWalker<'a>
impl<'a> RefUnwindSafe for ListWalker<'a>
impl<'a> Send for ListWalker<'a>
impl<'a> Sync for ListWalker<'a>
impl<'a> Unpin for ListWalker<'a>
impl<'a> UnsafeUnpin for ListWalker<'a>
impl<'a> UnwindSafe for ListWalker<'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