pub struct CommandEnvelopeV1 {
pub schema_version: String,
pub command: CommandPath,
pub success: bool,
pub code: String,
pub data: Value,
pub warnings: Vec<CommandWarningV1>,
pub errors: Vec<CommandFailureV1>,
pub timestamp: String,
}Expand description
Stable machine-readable command envelope contract.
Fields§
§schema_version: StringSchema identifier and version.
command: CommandPathCanonical command path.
success: boolSuccess flag for command execution.
code: StringStable status or error code for script consumers.
data: ValueCommand-specific response payload.
warnings: Vec<CommandWarningV1>Non-fatal warnings.
errors: Vec<CommandFailureV1>Fatal error summaries (empty on success).
timestamp: StringRFC3339 timestamp for envelope creation.
Implementations§
Source§impl CommandEnvelopeV1
impl CommandEnvelopeV1
Sourcepub fn new(
schema_version: &str,
command: CommandPath,
success: bool,
code: &str,
data: Value,
warnings: Vec<CommandWarningV1>,
errors: Vec<CommandFailureV1>,
timestamp: &str,
) -> Result<Self, String>
pub fn new( schema_version: &str, command: CommandPath, success: bool, code: &str, data: Value, warnings: Vec<CommandWarningV1>, errors: Vec<CommandFailureV1>, timestamp: &str, ) -> Result<Self, String>
Build a validated command envelope.
Trait Implementations§
Source§impl Clone for CommandEnvelopeV1
impl Clone for CommandEnvelopeV1
Source§fn clone(&self) -> CommandEnvelopeV1
fn clone(&self) -> CommandEnvelopeV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommandEnvelopeV1
impl Debug for CommandEnvelopeV1
Source§impl<'de> Deserialize<'de> for CommandEnvelopeV1
impl<'de> Deserialize<'de> for CommandEnvelopeV1
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 CommandEnvelopeV1
impl JsonSchema for CommandEnvelopeV1
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
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 is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CommandEnvelopeV1
impl PartialEq for CommandEnvelopeV1
Source§impl Serialize for CommandEnvelopeV1
impl Serialize for CommandEnvelopeV1
impl StructuralPartialEq for CommandEnvelopeV1
Auto Trait Implementations§
impl Freeze for CommandEnvelopeV1
impl RefUnwindSafe for CommandEnvelopeV1
impl Send for CommandEnvelopeV1
impl Sync for CommandEnvelopeV1
impl Unpin for CommandEnvelopeV1
impl UnsafeUnpin for CommandEnvelopeV1
impl UnwindSafe for CommandEnvelopeV1
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