Trait ConnectedDatagramSender
pub trait ConnectedDatagramSender:
Debug
+ Send
+ 'static {
// Required method
fn poll_send(
&mut self,
cx: &mut Context<'_>,
payload: &[u8],
) -> Poll<Result<(), DatagramError>>;
// Provided method
fn send_payload(
&mut self,
payload: &[u8],
) -> impl Future<Output = Result<(), DatagramError>> + Send
where Self: Sized { ... }
}Available on crate features
std and udp only.Expand description
A send handle for one established association. Each handle must support independent wakeup. Pending leaves the complete payload with the caller.
Required Methods§
Provided Methods§
fn send_payload(
&mut self,
payload: &[u8],
) -> impl Future<Output = Result<(), DatagramError>> + Sendwhere
Self: Sized,
fn send_payload(
&mut self,
payload: &[u8],
) -> impl Future<Output = Result<(), DatagramError>> + Sendwhere
Self: Sized,
Send one complete payload, waiting for room on this association.
Trait Implementations§
§impl ConnectedDatagramSender for Box<dyn ConnectedDatagramSender>
impl ConnectedDatagramSender for Box<dyn ConnectedDatagramSender>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".