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.
Auto Trait Implementations§
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> Freeze for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>where
Encoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>: Freeze,
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>where
Encoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>: Send,
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> Sync for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>where
Encoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>: Sync,
impl<const MAX_SYMBOL_SIZE: usize, const MAX_WINDOW_SYMBOLS: usize> Unpin for ContinuousEncoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>where
Encoder<MAX_SYMBOL_SIZE, MAX_WINDOW_SYMBOLS>: Unpin,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend 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