Trait libp2p_quic::Provider
source · 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>
Object Safety§
This trait is not object safe.