Skip to main content

Protocol

Trait Protocol 

Source
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§

Source

type ProviderEndpoint: Send + 'static

Source

type ClientEndpoint: Send + 'static

Required Methods§

Source

fn create_endpoints() -> (Self::ProviderEndpoint, Self::ClientEndpoint)

Source

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".

Implementors§

Source§

impl Protocol for End

Source§

impl Protocol for Release

Source§

impl Protocol for Z

Source§

impl<A, B> Protocol for ReceiveChannel<A, B>
where A: Protocol, B: Protocol,

Source§

impl<A, B> Protocol for SendChannel<A, B>
where A: Protocol, B: Protocol,

Source§

impl<C, F> Protocol for RecX<C, F>
where C: Send + 'static, F: Protocol + RecApp<(RecX<C, F>, C)>,

Source§

impl<F> Protocol for Lock<F>

Source§

impl<F> Protocol for SharedToLinear<LinearToShared<F>>
where F: Send + 'static + SharedRecApp<SharedToLinear<LinearToShared<F>>>,

Source§

impl<N> Protocol for S<N>
where N: Protocol,

Source§

impl<Row> Protocol for ExternalChoice<Row>
where Row: ToRow + Send + 'static,

Source§

impl<Row> Protocol for InternalChoice<Row>
where Row: ToRow + Send + 'static,

Source§

impl<T, A> Protocol for ReceiveValue<T, A>
where T: Send + 'static, A: Protocol,

Source§

impl<T, A> Protocol for SendValue<T, A>
where T: Send + 'static, A: Protocol,

Source§

impl<T> Protocol for Wrap<T>
where T: Wrapper + Send + 'static,