pub trait ServeExt: Serve {
// Provided method
fn serve_values<Params, Results>(
&self,
instance: &str,
func: &str,
paths: impl Into<Arc<[Box<[Option<usize>]>]>> + Send,
) -> impl Future<Output = Result<impl Stream<Item = Result<(Self::Context, Params, Option<impl Future<Output = Result<()>> + Send + Unpin + 'static>, impl FnOnce(Results) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>> + Send + 'static)>> + Send + 'static>> + Send
where Params: TupleDecode<Self::Incoming> + Send + 'static,
Results: TupleEncode<Self::Outgoing> + Send + 'static,
<Params::Decoder as Decoder>::Error: Error + Send + Sync + 'static,
<Results::Encoder as Encoder<Results>>::Error: Error + Send + Sync + 'static { ... }
}
Expand description
Extension trait for Serve
Provided Methods§
Sourcefn serve_values<Params, Results>(
&self,
instance: &str,
func: &str,
paths: impl Into<Arc<[Box<[Option<usize>]>]>> + Send,
) -> impl Future<Output = Result<impl Stream<Item = Result<(Self::Context, Params, Option<impl Future<Output = Result<()>> + Send + Unpin + 'static>, impl FnOnce(Results) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>> + Send + 'static)>> + Send + 'static>> + Send
fn serve_values<Params, Results>( &self, instance: &str, func: &str, paths: impl Into<Arc<[Box<[Option<usize>]>]>> + Send, ) -> impl Future<Output = Result<impl Stream<Item = Result<(Self::Context, Params, Option<impl Future<Output = Result<()>> + Send + Unpin + 'static>, impl FnOnce(Results) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'static>> + Send + 'static)>> + Send + 'static>> + Send
Serve function func
from instance instance
using typed Params
and Results
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.