pub trait Handler<R: ReplySink>:
MaybeSend
+ MaybeSync
+ 'static {
// Required method
fn handle(
&self,
call: SelfRef<RequestCall<'static>>,
reply: R,
schemas: Arc<SchemaRecvTracker>,
) -> impl Future<Output = ()> + MaybeSend + '_;
// Provided methods
fn retry_policy(&self, _method_id: MethodId) -> RetryPolicy { ... }
fn args_have_channels(&self, _method_id: MethodId) -> bool { ... }
fn response_wire_shape(
&self,
_method_id: MethodId,
) -> Option<&'static Shape> { ... }
}Required Methods§
Sourcefn handle(
&self,
call: SelfRef<RequestCall<'static>>,
reply: R,
schemas: Arc<SchemaRecvTracker>,
) -> impl Future<Output = ()> + MaybeSend + '_
fn handle( &self, call: SelfRef<RequestCall<'static>>, reply: R, schemas: Arc<SchemaRecvTracker>, ) -> impl Future<Output = ()> + MaybeSend + '_
Dispatch an incoming call to the appropriate method implementation.
Provided Methods§
Sourcefn retry_policy(&self, _method_id: MethodId) -> RetryPolicy
fn retry_policy(&self, _method_id: MethodId) -> RetryPolicy
Return the static retry policy for a method ID served by this handler.
Sourcefn args_have_channels(&self, _method_id: MethodId) -> bool
fn args_have_channels(&self, _method_id: MethodId) -> bool
Return whether the method’s argument shape contains any channels.
Sourcefn response_wire_shape(&self, _method_id: MethodId) -> Option<&'static Shape>
fn response_wire_shape(&self, _method_id: MethodId) -> Option<&'static Shape>
Return the canonical wire response shape for a method, if known.
This is the full wire type Result<T, VoxError<E>>, not the
user-facing return type T or Result<T, E>.
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.