pub struct PlainAssembler {
pub total_packets: u64,
pub lost_packets: u64,
pub recovered_packets: u64,
pub bad_packets: u64,
/* private fields */
}Expand description
Plain WFB FEC assembler.
This is used after data decryption, or directly for tests/pre-decrypted captures. It accepts primary and parity fragments and emits recovered application payloads in order.
Fields§
§total_packets: u64Total fragments observed.
lost_packets: u64Primary fragments considered lost.
recovered_packets: u64Primary fragments recovered by FEC.
bad_packets: u64Malformed or unrecoverable fragments.
Implementations§
Source§impl PlainAssembler
impl PlainAssembler
Sourcepub fn new(fec_k: usize, fec_n: usize) -> Result<Self, WfbError>
pub fn new(fec_k: usize, fec_n: usize) -> Result<Self, WfbError>
Create a plain assembler for fec_k primary and fec_n total fragments.
Sourcepub fn reset_fec(&mut self, fec_k: usize, fec_n: usize) -> Result<(), WfbError>
pub fn reset_fec(&mut self, fec_k: usize, fec_n: usize) -> Result<(), WfbError>
Reset assembler state and FEC parameters.
Sourcepub fn counters(&self) -> FecCounters
pub fn counters(&self) -> FecCounters
Return cumulative FEC counters.
Trait Implementations§
Source§impl Clone for PlainAssembler
impl Clone for PlainAssembler
Source§fn clone(&self) -> PlainAssembler
fn clone(&self) -> PlainAssembler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PlainAssembler
impl RefUnwindSafe for PlainAssembler
impl Send for PlainAssembler
impl Sync for PlainAssembler
impl Unpin for PlainAssembler
impl UnsafeUnpin for PlainAssembler
impl UnwindSafe for PlainAssembler
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