pub struct SecureSerialSender<'a, M: RawMutex + 'static, const N_INFLIGHT: usize> { /* private fields */ }Expand description
Sends logical packets over the link by chunking, queueing wire buffers, and waiting for ACKs.
Implementations§
Source§impl<'a, M, const N_INFLIGHT: usize> SecureSerialSender<'a, M, N_INFLIGHT>where
M: RawMutex + 'static,
impl<'a, M, const N_INFLIGHT: usize> SecureSerialSender<'a, M, N_INFLIGHT>where
M: RawMutex + 'static,
Sourcepub fn new(
tx_pool: &'static BufferPool<M, Vec<u8, CHUNK_LEN_MAX>, N_INFLIGHT>,
tx_queue: Sender<'a, M, BufferGuard<M, Vec<u8, CHUNK_LEN_MAX>>, N_INFLIGHT>,
rx_confirm: Receiver<'a, M, Ack, N_INFLIGHT>,
retransmit_delay: Duration,
allowed_retransmits: usize,
) -> Self
pub fn new( tx_pool: &'static BufferPool<M, Vec<u8, CHUNK_LEN_MAX>, N_INFLIGHT>, tx_queue: Sender<'a, M, BufferGuard<M, Vec<u8, CHUNK_LEN_MAX>>, N_INFLIGHT>, rx_confirm: Receiver<'a, M, Ack, N_INFLIGHT>, retransmit_delay: Duration, allowed_retransmits: usize, ) -> Self
Creates a sender using the shared TX pool and channels from crate::SecureSerialResources.
retransmit_delay spaces chunk transmissions; allowed_retransmits limits how often each
chunk may be sent before write_packet fails.
Auto Trait Implementations§
impl<'a, M, const N_INFLIGHT: usize> Freeze for SecureSerialSender<'a, M, N_INFLIGHT>
impl<'a, M, const N_INFLIGHT: usize> !RefUnwindSafe for SecureSerialSender<'a, M, N_INFLIGHT>
impl<'a, M, const N_INFLIGHT: usize> Send for SecureSerialSender<'a, M, N_INFLIGHT>where
M: Sync,
impl<'a, M, const N_INFLIGHT: usize> Sync for SecureSerialSender<'a, M, N_INFLIGHT>where
M: Sync,
impl<'a, M, const N_INFLIGHT: usize> Unpin for SecureSerialSender<'a, M, N_INFLIGHT>
impl<'a, M, const N_INFLIGHT: usize> UnsafeUnpin for SecureSerialSender<'a, M, N_INFLIGHT>
impl<'a, M, const N_INFLIGHT: usize> !UnwindSafe for SecureSerialSender<'a, M, N_INFLIGHT>
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