pub struct FrameAssembler {
pub dropped: u32,
/* private fields */
}Expand description
Collects one frame’s chunks into a caller-owned buffer.
Chunks may arrive in any order. A chunk from a new frame while the
current one is incomplete abandons it (a lost sector) and counts it in
dropped.
Fields§
§dropped: u32Frames abandoned with chunks missing.
Implementations§
Source§impl FrameAssembler
impl FrameAssembler
Sourcepub fn add(&mut self, sector: &[u8], buf: &mut [u8]) -> Option<Frame>
pub fn add(&mut self, sector: &[u8], buf: &mut [u8]) -> Option<Frame>
Add one sector (2048 user bytes). buf is the frame being filled
and must hold count * 2016 bytes. Returns the finished frame when
this chunk completes it; the caller then hands buf to the decoder
and passes a different buffer from now on.
Trait Implementations§
Source§impl Default for FrameAssembler
impl Default for FrameAssembler
Source§fn default() -> FrameAssembler
fn default() -> FrameAssembler
Returns the “default value” for a type. Read more