[][src]Struct fizyr_rpc::Message

pub struct Message<Body> {
    pub header: MessageHeader,
    pub body: Body,
}

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]

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]

Create a new request message.

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]

Create a new error response message.

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]

Create a new responder update message.

pub fn stream(request_id: u32, service_id: i32, body: Body) -> Self[src]

Create a new stream message.

Trait Implementations

impl<Body> Debug for Message<Body>[src]

Auto Trait Implementations

impl<Body> RefUnwindSafe for Message<Body> where
    Body: RefUnwindSafe

impl<Body> Send for Message<Body> where
    Body: Send

impl<Body> Sync for Message<Body> where
    Body: Sync

impl<Body> Unpin for Message<Body> where
    Body: Unpin

impl<Body> UnwindSafe for Message<Body> where
    Body: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.