pub struct CommandResponse {
pub schema_version: u32,
pub response_type: String,
pub ok: bool,
pub response: Value,
pub meta: CommandMeta,
}Expand description
Unified command response with envelope
Fields§
§schema_version: u32Schema version for introspection
response_type: StringResponse type identifier for introspection
ok: boolIndicates if the operation was successful
response: ValueOriginal API response
meta: CommandMetaExecution metadata
Implementations§
Source§impl CommandResponse
impl CommandResponse
Sourcepub fn new(
response: Value,
profile_name: Option<String>,
team_id: String,
user_id: String,
method: String,
command: String,
) -> Self
pub fn new( response: Value, profile_name: Option<String>, team_id: String, user_id: String, method: String, command: String, ) -> Self
Create a new command response with metadata
Sourcepub fn with_token_type(
response: Value,
profile_name: Option<String>,
team_id: String,
user_id: String,
method: String,
command: String,
token_type: Option<String>,
) -> Self
pub fn with_token_type( response: Value, profile_name: Option<String>, team_id: String, user_id: String, method: String, command: String, token_type: Option<String>, ) -> Self
Create a new command response with metadata including token type
Sourcepub fn with_idempotency(self, key: String, status: String) -> Self
pub fn with_idempotency(self, key: String, status: String) -> Self
Set idempotency metadata
Trait Implementations§
Source§impl Debug for CommandResponse
impl Debug for CommandResponse
Source§impl<'de> Deserialize<'de> for CommandResponse
impl<'de> Deserialize<'de> for CommandResponse
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 CommandResponse
impl RefUnwindSafe for CommandResponse
impl Send for CommandResponse
impl Sync for CommandResponse
impl Unpin for CommandResponse
impl UnwindSafe for CommandResponse
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