pub struct Response<T> {
pub status: ResponseStatus,
pub metadata: Option<QueryMetadata>,
pub data: Option<T>,
pub error: Option<ErrorDetail>,
pub warnings: Option<Vec<String>>,
}Expand description
Unified response envelope.
All obz commands produce this structure. The status field is always
"success" or "error", allowing AI Agents to reliably parse output.
Fields§
§status: ResponseStatusResponse status: “success” or “error”.
metadata: Option<QueryMetadata>Query metadata (success responses only).
data: Option<T>Response data (success responses only).
error: Option<ErrorDetail>Error detail (error responses only).
warnings: Option<Vec<String>>Non-fatal warnings from the backend.
Implementations§
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Response<T>where
T: DeserializeOwned,
impl<'de, T> Deserialize<'de> for Response<T>where
T: DeserializeOwned,
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<T> Freeze for Response<T>where
T: Freeze,
impl<T> RefUnwindSafe for Response<T>where
T: RefUnwindSafe,
impl<T> Send for Response<T>where
T: Send,
impl<T> Sync for Response<T>where
T: Sync,
impl<T> Unpin for Response<T>where
T: Unpin,
impl<T> UnsafeUnpin for Response<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Response<T>where
T: 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