pub enum StreamMessageContent {
Request {
id: i32,
method: Arc<str>,
params: Option<Value>,
},
Response {
id: i32,
result: Result<Option<Value>, Error>,
},
Notification {
method: Arc<str>,
params: Option<Value>,
},
}
Expand description
The content of a stream message.
This enum represents the three types of JSON-RPC messages:
- Requests: Method calls that expect a response
- Responses: Replies to previous requests
- Notifications: One-way messages that don’t expect a response
Variants§
Request
A JSON-RPC request message.
Fields
Response
A JSON-RPC response message.
Fields
Notification
A JSON-RPC notification message.
Trait Implementations§
Source§impl Clone for StreamMessageContent
impl Clone for StreamMessageContent
Source§fn clone(&self) -> StreamMessageContent
fn clone(&self) -> StreamMessageContent
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 moreAuto Trait Implementations§
impl Freeze for StreamMessageContent
impl RefUnwindSafe for StreamMessageContent
impl Send for StreamMessageContent
impl Sync for StreamMessageContent
impl Unpin for StreamMessageContent
impl UnwindSafe for StreamMessageContent
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