pub struct DatagramSender<H: SendDatagram<B>, B: Buf> { /* private fields */ }Expand description
Gives the ability to send datagrams.
Implementations§
Source§impl<H, B> DatagramSender<H, B>where
H: SendDatagram<B>,
B: Buf,
impl<H, B> DatagramSender<H, B>where
H: SendDatagram<B>,
B: Buf,
Sourcepub fn send_datagram(&mut self, data: B) -> Result<(), SendDatagramError>
pub fn send_datagram(&mut self, data: B) -> Result<(), SendDatagramError>
Sends a datagram
Trait Implementations§
Source§impl<H, B> ConnectionState for DatagramSender<H, B>where
H: SendDatagram<B>,
B: Buf,
impl<H, B> ConnectionState for DatagramSender<H, B>where
H: SendDatagram<B>,
B: Buf,
Get the shared state
Source§fn get_conn_error(&self) -> Option<ErrorOrigin>
fn get_conn_error(&self) -> Option<ErrorOrigin>
Get the connection error if the connection is in error state because of another task Read more
Source§fn set_conn_error(&self, error: ErrorOrigin) -> ErrorOrigin
fn set_conn_error(&self, error: ErrorOrigin) -> ErrorOrigin
tries to set the connection error
Source§fn set_conn_error_and_wake<T>(&self, error: T) -> ErrorOriginwhere
T: Into<ErrorOrigin>,
fn set_conn_error_and_wake<T>(&self, error: T) -> ErrorOriginwhere
T: Into<ErrorOrigin>,
set the connection error and wake the connection
Source§fn set_closing(&self)
fn set_closing(&self)
Set the connection to closing
Source§fn is_closing(&self) -> bool
fn is_closing(&self) -> bool
Check if the connection is closing
Source§fn set_settings(&self, settings: Settings)
fn set_settings(&self, settings: Settings)
Set the settings
Source§fn waker(&self) -> &AtomicWaker
fn waker(&self) -> &AtomicWaker
Returns the waker for the connection
Auto Trait Implementations§
impl<H, B> !RefUnwindSafe for DatagramSender<H, B>
impl<H, B> !UnwindSafe for DatagramSender<H, B>
impl<H, B> Freeze for DatagramSender<H, B>
impl<H, B> Send for DatagramSender<H, B>
impl<H, B> Sync for DatagramSender<H, B>
impl<H, B> Unpin for DatagramSender<H, B>
impl<H, B> UnsafeUnpin for DatagramSender<H, B>
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