pub trait Serve: Sync {
type Context: Send + Sync + 'static;
type Outgoing: AsyncWrite + Index<Self::Outgoing> + Send + Sync + Unpin + 'static;
type Incoming: AsyncRead + Index<Self::Incoming> + Send + Sync + Unpin + 'static;
// Required method
fn serve(
&self,
instance: &str,
func: &str,
paths: impl Into<Arc<[Box<[Option<usize>]>]>> + Send,
) -> impl Future<Output = Result<impl Stream<Item = Result<(Self::Context, Self::Outgoing, Self::Incoming)>> + Send + 'static>> + Send;
}
Expand description
Server-side handle to a wRPC transport
Required Associated Types§
Required Methods§
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.