pub struct Method<Req, Resp> {
pub ty: MethodType,
pub name: &'static str,
pub req_mar: Marshaller<Req>,
pub resp_mar: Marshaller<Resp>,
}
Expand description
A description of a remote method.
Fields
ty: MethodType
Type of method.
name: &'static str
Full qualified name of the method.
req_mar: Marshaller<Req>
The marshaller used for request messages.
resp_mar: Marshaller<Resp>
The marshaller used for response messages.
Implementations
sourceimpl<Req, Resp> Method<Req, Resp>
impl<Req, Resp> Method<Req, Resp>
sourcepub fn req_ser(&self) -> fn(_: &Req, _: &mut GrpcSlice) -> Result<()>
pub fn req_ser(&self) -> fn(_: &Req, _: &mut GrpcSlice) -> Result<()>
Get the request serializer.
sourcepub fn req_de(&self) -> fn(_: MessageReader) -> Result<Req>
pub fn req_de(&self) -> fn(_: MessageReader) -> Result<Req>
Get the request deserializer.
sourcepub fn resp_ser(&self) -> fn(_: &Resp, _: &mut GrpcSlice) -> Result<()>
pub fn resp_ser(&self) -> fn(_: &Resp, _: &mut GrpcSlice) -> Result<()>
Get the response serializer.
sourcepub fn resp_de(&self) -> fn(_: MessageReader) -> Result<Resp>
pub fn resp_de(&self) -> fn(_: MessageReader) -> Result<Resp>
Get the response deserializer.
Auto Trait Implementations
impl<Req, Resp> RefUnwindSafe for Method<Req, Resp>
impl<Req, Resp> Send for Method<Req, Resp>
impl<Req, Resp> Sync for Method<Req, Resp>
impl<Req, Resp> Unpin for Method<Req, Resp>
impl<Req, Resp> UnwindSafe for Method<Req, Resp>
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