pub struct RpcResponse {
pub id: Option<String>,
pub command: String,
pub success: bool,
pub data: Option<Value>,
pub error: Option<String>,
}Expand description
The {"type":"response"} acknowledgement for one command.
Fields§
§id: Option<String>§command: StringWhich command this answers ("parse" for unparseable input).
success: bool§data: Option<Value>§error: Option<String>Implementations§
Source§impl RpcResponse
impl RpcResponse
Sourcepub fn disposition(&self) -> Option<InputDisposition>
pub fn disposition(&self) -> Option<InputDisposition>
What pi did with the input a successful prompt, steer or
follow_up submitted (data.disposition, pi ≥ 0.99.0). None on
other commands, on failures, and from older CLIs.
Trait Implementations§
Source§impl Clone for RpcResponse
impl Clone for RpcResponse
Source§impl Debug for RpcResponse
impl Debug for RpcResponse
Source§impl<'de> Deserialize<'de> for RpcResponse
impl<'de> Deserialize<'de> for RpcResponse
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
Source§impl PartialEq for RpcResponse
impl PartialEq for RpcResponse
Source§impl Serialize for RpcResponse
impl Serialize for RpcResponse
impl StructuralPartialEq for RpcResponse
Auto Trait Implementations§
impl Freeze for RpcResponse
impl RefUnwindSafe for RpcResponse
impl Send for RpcResponse
impl Sync for RpcResponse
impl Unpin for RpcResponse
impl UnsafeUnpin for RpcResponse
impl UnwindSafe for RpcResponse
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