netemul

Trait RealmUdpSocket

Source
pub trait RealmUdpSocket: Sized {
    // Required method
    fn bind_in_realm<'a>(
        realm: &'a TestRealm<'a>,
        addr: SocketAddr,
    ) -> LocalBoxFuture<'a, Result<Self, Error>>;
}
Expand description

Trait describing UDP sockets that can be bound in a testing realm.

Required Methods§

Source

fn bind_in_realm<'a>( realm: &'a TestRealm<'a>, addr: SocketAddr, ) -> LocalBoxFuture<'a, Result<Self, Error>>

Creates a UDP socket in realm bound to addr.

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.

Implementations on Foreign Types§

Source§

impl RealmUdpSocket for UdpSocket

Source§

fn bind_in_realm<'a>( realm: &'a TestRealm<'a>, addr: SocketAddr, ) -> LocalBoxFuture<'a, Result<Self, Error>>

Source§

impl RealmUdpSocket for UdpSocket

Source§

fn bind_in_realm<'a>( realm: &'a TestRealm<'a>, addr: SocketAddr, ) -> LocalBoxFuture<'a, Result<Self, Error>>

Implementors§