Struct fizyr_rpc::Message [−][src]
pub struct Message<Body> { pub header: MessageHeader, pub body: Body, }
Expand description
A complete RPC message, including header and body.
Fields
header: MessageHeader
The header of the message.
body: Body
The body of the message.
Implementations
impl<Body> Message<Body>
[src]
impl<Body> Message<Body>
[src]pub fn new(header: MessageHeader, body: Body) -> Self
[src]
pub fn new(header: MessageHeader, body: Body) -> Self
[src]Create a new message with a header and a body.
pub fn request(request_id: u32, service_id: i32, body: Body) -> Self
[src]
pub fn request(request_id: u32, service_id: i32, body: Body) -> Self
[src]Create a new request message.
pub fn response(request_id: u32, service_id: i32, body: Body) -> Self
[src]
pub fn response(request_id: u32, service_id: i32, body: Body) -> Self
[src]Create a new response message.
pub fn error_response(request_id: u32, message: &str) -> Self where
Body: Body,
[src]
pub fn error_response(request_id: u32, message: &str) -> Self where
Body: Body,
[src]Create a new error response message.
pub fn requester_update(request_id: u32, service_id: i32, body: Body) -> Self
[src]
pub fn requester_update(request_id: u32, service_id: i32, body: Body) -> Self
[src]Create a new requester update message.
pub fn responder_update(request_id: u32, service_id: i32, body: Body) -> Self
[src]
pub fn responder_update(request_id: u32, service_id: i32, body: Body) -> Self
[src]Create a new responder update message.
Trait Implementations
Auto Trait Implementations
impl<Body> RefUnwindSafe for Message<Body> where
Body: RefUnwindSafe,
Body: RefUnwindSafe,
impl<Body> Send for Message<Body> where
Body: Send,
Body: Send,
impl<Body> Sync for Message<Body> where
Body: Sync,
Body: Sync,
impl<Body> Unpin for Message<Body> where
Body: Unpin,
Body: Unpin,
impl<Body> UnwindSafe for Message<Body> where
Body: UnwindSafe,
Body: UnwindSafe,