pub struct RpcMessage {
pub header: RpcProtocolHeader,
pub method: Bytes,
pub body: Bytes,
}Expand description
RPC Message
Fields§
§header: RpcProtocolHeader§method: Bytes§body: BytesImplementations§
Source§impl RpcMessage
impl RpcMessage
Sourcepub fn new_request(sequence: u64, method: Bytes, body: Bytes) -> Self
pub fn new_request(sequence: u64, method: Bytes, body: Bytes) -> Self
Create a new request message
Sourcepub fn new_response(sequence: u64, body: Bytes) -> Self
pub fn new_response(sequence: u64, body: Bytes) -> Self
Create a new response message
Sourcepub fn new_notify(sequence: u64, method: Bytes, body: Bytes) -> Self
pub fn new_notify(sequence: u64, method: Bytes, body: Bytes) -> Self
Create a new notify message
Sourcepub fn new_sysrsp(sequence: u64, body: Bytes) -> Self
pub fn new_sysrsp(sequence: u64, body: Bytes) -> Self
Create a new system response message (for error responses when server didn’t finish)
Trait Implementations§
Source§impl Clone for RpcMessage
impl Clone for RpcMessage
Source§fn clone(&self) -> RpcMessage
fn clone(&self) -> RpcMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RpcMessage
impl Debug for RpcMessage
Auto Trait Implementations§
impl !Freeze for RpcMessage
impl RefUnwindSafe for RpcMessage
impl Send for RpcMessage
impl Sync for RpcMessage
impl Unpin for RpcMessage
impl UnwindSafe for RpcMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more