pub struct JsonRequest {
pub version: String,
pub operations: Vec<JsonOp>,
pub options: OpOptions,
pub undo: Option<UndoRequest>,
pub extra: Map<String, Value>,
}Expand description
A structured JSON request from an agent.
Fields§
§version: String§operations: Vec<JsonOp>§options: OpOptions§undo: Option<UndoRequest>Undo request (mutually exclusive with operations).
extra: Map<String, Value>Forward-compatible: capture unknown top-level fields.
Implementations§
Source§impl JsonRequest
impl JsonRequest
Sourcepub fn parse(input: &str) -> Result<Self, RipsedError>
pub fn parse(input: &str) -> Result<Self, RipsedError>
Parse and validate a JSON request from a string.
Trait Implementations§
Source§impl Clone for JsonRequest
impl Clone for JsonRequest
Source§fn clone(&self) -> JsonRequest
fn clone(&self) -> JsonRequest
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 JsonRequest
impl Debug for JsonRequest
Source§impl<'de> Deserialize<'de> for JsonRequest
impl<'de> Deserialize<'de> for JsonRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for JsonRequest
impl RefUnwindSafe for JsonRequest
impl Send for JsonRequest
impl Sync for JsonRequest
impl Unpin for JsonRequest
impl UnsafeUnpin for JsonRequest
impl UnwindSafe for JsonRequest
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