pub struct FieldReader<'a> { /* private fields */ }Expand description
Walks a tagged-field payload.
Implementations§
Source§impl<'a> FieldReader<'a>
impl<'a> FieldReader<'a>
pub fn new(b: &'a [u8]) -> Self
pub fn done(&self) -> bool
Sourcepub fn next_field(&mut self) -> Result<(u16, u8), Error>
pub fn next_field(&mut self) -> Result<(u16, u8), Error>
Returns the next field tag and wire kind.
Sourcepub fn u64(&mut self) -> Result<u64, Error>
pub fn u64(&mut self) -> Result<u64, Error>
Reads a WireU64 value (call after next returned WireU64).
Auto Trait Implementations§
impl<'a> Freeze for FieldReader<'a>
impl<'a> RefUnwindSafe for FieldReader<'a>
impl<'a> Send for FieldReader<'a>
impl<'a> Sync for FieldReader<'a>
impl<'a> Unpin for FieldReader<'a>
impl<'a> UnsafeUnpin for FieldReader<'a>
impl<'a> UnwindSafe for FieldReader<'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