pub struct ContinuousEncoder<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> { /* private fields */ }Expand description
Stateful RFC 8681 encoder for a continuous CopperList lane.
Record serialization, fragmentation, hashing, FEC, and packet allocation run on the semantic-output worker, never on Copper’s real-time task path.
Implementations§
Source§impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>
pub fn new( identity: StreamIdentity, lane: Lane, config: RlcConfig, max_record_bytes: usize, initial_esi: EncodingSymbolId, ) -> Result<Self>
pub const fn config(&self) -> RlcConfig
Sourcepub fn push_record(
&mut self,
record: &[u8],
output: &mut Vec<Vec<u8>>,
) -> Result<usize>
pub fn push_record( &mut self, record: &[u8], output: &mut Vec<Vec<u8>>, ) -> Result<usize>
Fragments and emits one already-framed CopperList record as systematic symbols.
Sourcepub fn push_record_with(
&mut self,
record: &[u8],
datagram: &mut [u8],
emit: impl FnMut(&[u8]) -> Result<()>,
) -> Result<usize>
pub fn push_record_with( &mut self, record: &[u8], datagram: &mut [u8], emit: impl FnMut(&[u8]) -> Result<()>, ) -> Result<usize>
Fragments a record and emits each systematic packet immediately from reusable caller-owned storage.
Sourcepub fn push_repair(
&mut self,
parameters: RepairParameters,
output: &mut Vec<Vec<u8>>,
) -> Result<RepairPayloadId>
pub fn push_repair( &mut self, parameters: RepairParameters, output: &mut Vec<Vec<u8>>, ) -> Result<RepairPayloadId>
Emits one repair symbol over the encoder’s current sliding window.
Sourcepub fn push_repair_with(
&mut self,
parameters: RepairParameters,
datagram: &mut [u8],
emit: impl FnMut(&[u8]) -> Result<()>,
) -> Result<RepairPayloadId>
pub fn push_repair_with( &mut self, parameters: RepairParameters, datagram: &mut [u8], emit: impl FnMut(&[u8]) -> Result<()>, ) -> Result<RepairPayloadId>
Emits one repair packet immediately from reusable caller-owned storage.
Auto Trait Implementations§
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> Freeze for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> RefUnwindSafe for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>where
Encoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>: RefUnwindSafe,
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> Send for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> Sync for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> Unpin for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> UnsafeUnpin for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>where
Encoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>: UnsafeUnpin,
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> UnwindSafe for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>where
Encoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>: UnwindSafe,
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
impl<T> GetTypeRegistration for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more