Skip to main content

CodingReader

Struct CodingReader 

Source
pub struct CodingReader<R, D, F, P, const BUF: usize> {
    pub randomizer: R,
    pub deframer: D,
    pub fec: F,
    pub reader: P,
    /* private fields */
}
Expand description

Composes physical reader → deframer → FEC → derandomizer into a single CodingRead.

Fields§

§randomizer: R

Derandomizer (same as randomizer — XOR is self-inverse).

§deframer: D

Deframer (e.g. ASM sync, CLTU decode).

§fec: F

Forward error-correction decoder.

§reader: P

Physical layer reader.

Implementations§

Source§

impl<R, D, F, P, const BUF: usize> CodingReader<R, D, F, P, BUF>

Source

pub fn new(randomizer: R, deframer: D, fec: F, reader: P) -> Self

Creates a new read pipeline.

Trait Implementations§

Source§

impl<R, D, F, P, const BUF: usize> CodingRead for CodingReader<R, D, F, P, BUF>

Source§

type Error = CodingReadError<<D as Deframer>::Error, <F as FecDecoder>::Error, <P as PhysicalRead>::Error>

Error type for read operations.
Source§

async fn read(&mut self, buffer: &mut [u8]) -> Result<usize, Self::Error>

Reads and decodes a transfer frame into buffer.

Auto Trait Implementations§

§

impl<R, D, F, P, const BUF: usize> Freeze for CodingReader<R, D, F, P, BUF>
where R: Freeze, D: Freeze, F: Freeze, P: Freeze,

§

impl<R, D, F, P, const BUF: usize> RefUnwindSafe for CodingReader<R, D, F, P, BUF>

§

impl<R, D, F, P, const BUF: usize> Send for CodingReader<R, D, F, P, BUF>
where R: Send, D: Send, F: Send, P: Send,

§

impl<R, D, F, P, const BUF: usize> Sync for CodingReader<R, D, F, P, BUF>
where R: Sync, D: Sync, F: Sync, P: Sync,

§

impl<R, D, F, P, const BUF: usize> Unpin for CodingReader<R, D, F, P, BUF>
where R: Unpin, D: Unpin, F: Unpin, P: Unpin,

§

impl<R, D, F, P, const BUF: usize> UnsafeUnpin for CodingReader<R, D, F, P, BUF>

§

impl<R, D, F, P, const BUF: usize> UnwindSafe for CodingReader<R, D, F, P, BUF>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.