pub struct Rpc { /* private fields */ }Expand description
<rpc> envelope with a message-id (RFC6241 4.1).
Connection assigns a per-session
monotonically increasing integer. Standalone construction defaults to "1".
Implementations§
Source§impl Rpc
impl Rpc
Sourcepub fn new_with_operation(operation: RpcOperation) -> Rpc
pub fn new_with_operation(operation: RpcOperation) -> Rpc
Wrap operation with message-id "1".
Connection overwrites this with the
next session counter before sending.
Sourcepub fn with_message_id(
operation: RpcOperation,
message_id: impl Into<String>,
) -> Rpc
pub fn with_message_id( operation: RpcOperation, message_id: impl Into<String>, ) -> Rpc
Wrap operation with an explicit message-id.
Sourcepub fn message_id(&self) -> &str
pub fn message_id(&self) -> &str
message-id carried by this request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rpc
impl RefUnwindSafe for Rpc
impl Send for Rpc
impl Sync for Rpc
impl Unpin for Rpc
impl UnsafeUnpin for Rpc
impl UnwindSafe for Rpc
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