pub trait RealmUdpSocket: Sized {
// Required methods
fn bind_in_realm<'a>(
realm: &'a TestRealm<'a>,
addr: SocketAddr,
) -> LocalBoxFuture<'a, Result<Self, Error>>;
fn bind_in_realm_with_options<'a>(
realm: &'a TestRealm<'a>,
addr: SocketAddr,
options: SocketCreationOptions,
) -> LocalBoxFuture<'a, Result<Self, Error>>;
}Expand description
Trait describing UDP sockets that can be bound in a testing realm.
Required Methods§
Sourcefn bind_in_realm<'a>(
realm: &'a TestRealm<'a>,
addr: SocketAddr,
) -> LocalBoxFuture<'a, Result<Self, Error>>
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.
Sourcefn bind_in_realm_with_options<'a>(
realm: &'a TestRealm<'a>,
addr: SocketAddr,
options: SocketCreationOptions,
) -> LocalBoxFuture<'a, Result<Self, Error>>
fn bind_in_realm_with_options<'a>( realm: &'a TestRealm<'a>, addr: SocketAddr, options: SocketCreationOptions, ) -> LocalBoxFuture<'a, Result<Self, Error>>
Creates a UDP socket in realm bound to addr with the given options.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".