pub struct RpcRequest {
pub id: Option<JsonValue>,
pub command: RpcCommand,
}Expand description
A parsed input line that is not an extension_ui_response.
Fields§
§id: Option<JsonValue>Correlation id (echoed verbatim).
command: RpcCommandThe command.
Implementations§
Source§impl RpcRequest
impl RpcRequest
Sourcepub fn from_value(value: JsonValue) -> Result<Self, RejectedCommand>
pub fn from_value(value: JsonValue) -> Result<Self, RejectedCommand>
Decodes a command object (handleCommand dispatch rules).
§Errors
Unknown command: {type} for unknown or missing types, the decoder message for bad
fields.
Trait Implementations§
Source§impl Clone for RpcRequest
impl Clone for RpcRequest
Source§impl Debug for RpcRequest
impl Debug for RpcRequest
Source§impl PartialEq for RpcRequest
impl PartialEq for RpcRequest
impl StructuralPartialEq for RpcRequest
Auto Trait Implementations§
impl Freeze for RpcRequest
impl RefUnwindSafe for RpcRequest
impl Send for RpcRequest
impl Sync for RpcRequest
impl Unpin for RpcRequest
impl UnsafeUnpin for RpcRequest
impl UnwindSafe for RpcRequest
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