HostWithStore

Trait HostWithStore 

Source
pub trait HostWithStore: HasData + Send {
    // Required method
    fn handle<T>(
        accessor: &Accessor<T, Self>,
        request: Resource<Request>,
    ) -> impl Future<Output = Result<Resource<Response>, TrappableError<ErrorCode>>> + Send;
}
Available on crate feature p3 only.

Required Methods§

Source

fn handle<T>( accessor: &Accessor<T, Self>, request: Resource<Request>, ) -> impl Future<Output = Result<Resource<Response>, TrappableError<ErrorCode>>> + Send

When exported, this function may be called with either an incoming request read from the network or a request synthesized or forwarded by another component.

When imported, this function may be used to either send an outgoing request over the network or pass it to another component.

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.

Implementors§