pub struct Sender { /* private fields */ }Expand description
Sender for an AF_XDP socket
Implementations§
Source§impl Sender
impl Sender
Sourcepub fn try_send(&mut self, data: impl AsRef<[u8]>) -> Result<(), ChannelError>
pub fn try_send(&mut self, data: impl AsRef<[u8]>) -> Result<(), ChannelError>
Attempts to send a packet.
§Errors
Returns ChannelError::Disconnected if the channel is closed.
Returns ChannelError::Poll for unexpected poll errors.
Sourcepub fn send(&mut self, data: impl AsRef<[u8]>) -> Result<(), ChannelError>
pub fn send(&mut self, data: impl AsRef<[u8]>) -> Result<(), ChannelError>
Blocks until the packet is sent.
§Errors
Returns ChannelError::Disconnected if the channel is closed.
Auto Trait Implementations§
impl Freeze for Sender
impl !RefUnwindSafe for Sender
impl Send for Sender
impl !Sync for Sender
impl Unpin for Sender
impl UnsafeUnpin for Sender
impl !UnwindSafe for Sender
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