pub trait Provider:
Unpin
+ Send
+ Sized
+ 'static {
type IfWatcher: Unpin + Send;
// Required methods
fn runtime() -> Runtime;
fn new_if_watcher() -> Result<Self::IfWatcher>;
fn poll_if_event(
watcher: &mut Self::IfWatcher,
cx: &mut Context<'_>,
) -> Poll<Result<IfEvent>>;
fn sleep(duration: Duration) -> BoxFuture<'static, ()>;
fn send_to<'a>(
udp_socket: &'a UdpSocket,
buf: &'a [u8],
target: SocketAddr,
) -> BoxFuture<'a, Result<usize>>;
}
Expand description
Provider for a corresponding quinn runtime and spawning tasks.
Required Associated Types§
Required Methods§
Sourcefn new_if_watcher() -> Result<Self::IfWatcher>
fn new_if_watcher() -> Result<Self::IfWatcher>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.