pub struct Cop1Reader { /* private fields */ }Expand description
COP-1 receiver-side reliability (FARM-1).
Wraps a FarmMachine and implements ReliabilityRead.
Each read call parses the TC
frame header to classify it as AD or BD and feeds the FARM-1
state machine. BC (control) frames are treated as invalid in
the trait impl — use farm_mut for direct
BC handling.
Implementations§
Source§impl Cop1Reader
impl Cop1Reader
Sourcepub fn new(config: FarmConfig) -> Self
pub fn new(config: FarmConfig) -> Self
Creates a new COP-1 reader in the Open state.
Sourcepub fn farm(&self) -> &FarmMachine
pub fn farm(&self) -> &FarmMachine
Returns a reference to the inner FARM-1 state machine.
Sourcepub fn farm_mut(&mut self) -> &mut FarmMachine
pub fn farm_mut(&mut self) -> &mut FarmMachine
Returns a mutable reference for direct FARM-1 control.
Trait Implementations§
Source§impl ReliabilityRead for Cop1Reader
impl ReliabilityRead for Cop1Reader
Source§type Action = Cop1ReadResult
type Action = Cop1ReadResult
Action to take after processing a frame.
Source§fn read(&mut self, frame: &[u8]) -> Cop1ReadResult
fn read(&mut self, frame: &[u8]) -> Cop1ReadResult
Processes an incoming frame through the reliability layer.
Auto Trait Implementations§
impl Freeze for Cop1Reader
impl RefUnwindSafe for Cop1Reader
impl Send for Cop1Reader
impl Sync for Cop1Reader
impl Unpin for Cop1Reader
impl UnsafeUnpin for Cop1Reader
impl UnwindSafe for Cop1Reader
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