Struct heph::actor_ref::rpc::RpcMessage[][src]

pub struct RpcMessage<Req, Res> {
    pub request: Req,
    pub response: RpcResponse<Res>,
}
Expand description

Message type that holds an RPC request.

It holds both the request (Req) and the way to respond RpcResponse.

Fields

request: Req

The request object.

response: RpcResponse<Res>

A way to respond to the call.

Implementations

Convenience method to handle a Request and return a Response.

The function f is called with self.request, the response returned by the function f is than returned to the request maker via self.response.respond.

Notes

If the receiving end is no longer connected the function f is not called and Ok(()) is returned instead.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.