pub struct Response {
pub ok: bool,
pub data: Option<Value>,
pub error: Option<String>,
pub error_detail: Option<ErrorDetail>,
pub meta: Option<ResponseMeta>,
}Fields§
§ok: bool§data: Option<Value>§error: Option<String>§error_detail: Option<ErrorDetail>§meta: Option<ResponseMeta>Implementations§
Source§impl Response
impl Response
pub fn action_result(record: OperationRecord) -> Self
pub fn agent_result(result: AgentStepResult) -> Self
pub fn exit_code(&self) -> i32
pub fn ok(data: impl Into<Value>) -> Self
pub fn ok_text(msg: impl Into<String>) -> Self
pub fn err(msg: impl Into<String>) -> Self
pub fn err_detail(detail: ErrorDetail) -> Self
pub fn with_meta(self, meta: ResponseMeta) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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 JsonSchema for Response
impl JsonSchema for Response
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Forget for Response
impl Freeze for Responsewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<Value>: Freeze,
*const LeafNode<String, Value> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, Value)>>: Freeze,
*const ErrorContext is !null: Freeze,
PhantomData<ErrorContext>: Freeze,
impl Move for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Responsewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
*const LeafNode<String, Value> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Value)>>: UnsafeUnpin,
*const ErrorContext is !null: UnsafeUnpin,
PhantomData<ErrorContext>: UnsafeUnpin,
impl UnwindSafe for Responsewhere
RawVecInner: UnwindSafe,
BTreeMap<String, Value>: UnwindSafe,
BoxRaw<ErrorContext>: UnwindSafe,
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