pub trait Protocol:
SealedProtocol
+ Send
+ 'static {
type ProviderEndpoint: Send + 'static;
type ClientEndpoint: Send + 'static;
// Required methods
fn create_endpoints() -> (Self::ProviderEndpoint, Self::ClientEndpoint);
fn forward(
client_end: Self::ClientEndpoint,
provider_end: Self::ProviderEndpoint,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>;
}Required Associated Types§
type ProviderEndpoint: Send + 'static
type ClientEndpoint: Send + 'static
Required Methods§
fn create_endpoints() -> (Self::ProviderEndpoint, Self::ClientEndpoint)
fn forward( client_end: Self::ClientEndpoint, provider_end: Self::ProviderEndpoint, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".