pub struct SrsppTxHandle<'a, E, S: MessageStore, R: Reachable, const WIN: usize, const BUF: usize, const MTU: usize> { /* private fields */ }Expand description
Handle for sending data over an SRSPP node.
Implementations§
Source§impl<'a, E: Clone, S: MessageStore, R: Reachable, const WIN: usize, const BUF: usize, const MTU: usize> SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E: Clone, S: MessageStore, R: Reachable, const WIN: usize, const BUF: usize, const MTU: usize> SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
Sourcepub async fn send(
&mut self,
target: impl Into<Address>,
data: &(impl IntoBytes + Immutable + ?Sized),
) -> Result<(), TransportError<E>>
pub async fn send( &mut self, target: impl Into<Address>, data: &(impl IntoBytes + Immutable + ?Sized), ) -> Result<(), TransportError<E>>
Sends data to the given target.
If the destination is unreachable, the message is stored for later delivery by the driver. If reachable, it enters SRSPP normally.
Sourcepub fn close(&mut self)
pub fn close(&mut self)
Signal that no more data will be sent. Driver will exit once all pending data is acknowledged and the store is drained.
Sourcepub fn available_bytes(&self) -> usize
pub fn available_bytes(&self) -> usize
Check available buffer space in bytes.
Sourcepub fn available_window(&self) -> usize
pub fn available_window(&self) -> usize
Check available window slots.
Trait Implementations§
Source§impl<'a, E, S: MessageStore, R: Reachable, const WIN: usize, const BUF: usize, const MTU: usize> Clone for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E, S: MessageStore, R: Reachable, const WIN: usize, const BUF: usize, const MTU: usize> Clone for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E, S: MessageStore, R: Reachable, const WIN: usize, const BUF: usize, const MTU: usize> Copy for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
Auto Trait Implementations§
impl<'a, E, S, R, const WIN: usize, const BUF: usize, const MTU: usize> Freeze for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E, S, R, const WIN: usize, const BUF: usize, const MTU: usize> !RefUnwindSafe for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E, S, R, const WIN: usize, const BUF: usize, const MTU: usize> !Send for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E, S, R, const WIN: usize, const BUF: usize, const MTU: usize> !Sync for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E, S, R, const WIN: usize, const BUF: usize, const MTU: usize> Unpin for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E, S, R, const WIN: usize, const BUF: usize, const MTU: usize> UnsafeUnpin for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
impl<'a, E, S, R, const WIN: usize, const BUF: usize, const MTU: usize> !UnwindSafe for SrsppTxHandle<'a, E, S, R, WIN, BUF, MTU>
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