pub struct DecodeProgress {
pub consumed: u64,
pub written: u64,
pub frame_len: Option<u64>,
}Expand description
Progress reported with DecodeError::InvalidFrame.
Describes how far decoding got before a delimiter arrived inside an incomplete COBS block.
The default value contains zero counts and frame_len: None.
The serde feature enables serialization and deserialization. The defmt
feature enables compact diagnostic formatting.
Fields§
§consumed: u64Number of encoded bytes processed, including zero padding and the invalidating delimiter.
The next frame starts at source[consumed as usize..].
written: u64Number of decoded bytes written to the destination before the frame was found invalid.
Includes reconstructed payload zeros. The bytes remain in the destination.
frame_len: Option<u64>Decoded length of a frame completed by a delimiter.
Always None in an InvalidFrame
error.
Trait Implementations§
Source§impl Clone for DecodeProgress
impl Clone for DecodeProgress
impl Copy for DecodeProgress
Source§impl Debug for DecodeProgress
impl Debug for DecodeProgress
Source§impl Default for DecodeProgress
impl Default for DecodeProgress
Source§impl<'de> Deserialize<'de> for DecodeProgress
impl<'de> Deserialize<'de> for DecodeProgress
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DecodeProgress
Source§impl Format for DecodeProgress
impl Format for DecodeProgress
Source§impl Hash for DecodeProgress
impl Hash for DecodeProgress
Source§impl PartialEq for DecodeProgress
impl PartialEq for DecodeProgress
Source§impl Serialize for DecodeProgress
impl Serialize for DecodeProgress
impl StructuralPartialEq for DecodeProgress
Auto Trait Implementations§
impl Freeze for DecodeProgress
impl RefUnwindSafe for DecodeProgress
impl Send for DecodeProgress
impl Sync for DecodeProgress
impl Unpin for DecodeProgress
impl UnsafeUnpin for DecodeProgress
impl UnwindSafe for DecodeProgress
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