Struct grpc::rt::MethodHandlerUnary
source · pub struct MethodHandlerUnary<F> { /* private fields */ }
Implementations
sourceimpl<F> MethodHandlerUnary<F>
impl<F> MethodHandlerUnary<F>
pub fn new<Req, Resp>(f: F) -> Selfwhere
Req: Send + 'static,
Resp: Send + 'static,
F: Fn(RequestOptions, Req) -> SingleResponse<Resp> + Send + 'static,
Trait Implementations
sourceimpl<F> GrpcStreamingFlavor for MethodHandlerUnary<F>
impl<F> GrpcStreamingFlavor for MethodHandlerUnary<F>
type Flavor = GrpcStreamingUnary
fn streaming() -> GrpcStreaming
sourceimpl<Req, Resp, F> MethodHandler<Req, Resp> for MethodHandlerUnary<F>where
Req: Send + 'static,
Resp: Send + 'static,
F: Fn(RequestOptions, Req) -> SingleResponse<Resp> + Send + Sync + 'static,
impl<Req, Resp, F> MethodHandler<Req, Resp> for MethodHandlerUnary<F>where
Req: Send + 'static,
Resp: Send + 'static,
F: Fn(RequestOptions, Req) -> SingleResponse<Resp> + Send + Sync + 'static,
fn handle(
&self,
m: RequestOptions,
req: StreamingRequest<Req>
) -> StreamingResponse<Resp>
Auto Trait Implementations
impl<F> RefUnwindSafe for MethodHandlerUnary<F>where
F: RefUnwindSafe,
impl<F> Send for MethodHandlerUnary<F>where
F: Send + Sync,
impl<F> Sync for MethodHandlerUnary<F>where
F: Send + Sync,
impl<F> Unpin for MethodHandlerUnary<F>
impl<F> UnwindSafe for MethodHandlerUnary<F>where
F: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more