pub struct ResponseDecoder { /* private fields */ }Expand description
Ground-side reassembler for one response.
Seeded from any single fragment’s oti, then fed fragments in whatever
order the lane delivers them. Completes the moment enough symbols have
arrived, which is k of the k + RPC_REPAIR_SYMBOLS transmitted — waiting
for every index is exactly the geometric decay the repair symbols exist to
remove.
Implementations§
Source§impl ResponseDecoder
impl ResponseDecoder
Sourcepub fn new(oti: u32) -> Option<Self>
pub fn new(oti: u32) -> Option<Self>
A decoder for a response whose fragments carry oti.
Returns None for a transfer length past MAX_RESPONSE_BODY. The
field arrives off the radio and RaptorQ sizes its matrices from it, so
an unbounded value is an allocation the ground refuses rather than
attempts.
Sourcepub fn symbol_size(&self) -> usize
pub fn symbol_size(&self) -> usize
The symbol size every fragment of this response carries.
Sourcepub fn push(&mut self, index: u16, symbol: &[u8]) -> FragmentOutcome
pub fn push(&mut self, index: u16, symbol: &[u8]) -> FragmentOutcome
Feed one fragment.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResponseDecoder
impl RefUnwindSafe for ResponseDecoder
impl Send for ResponseDecoder
impl Sync for ResponseDecoder
impl Unpin for ResponseDecoder
impl UnsafeUnpin for ResponseDecoder
impl UnwindSafe for ResponseDecoder
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