pub struct ActionSpec {
pub name: &'static str,
pub description: &'static str,
pub input: &'static Schema,
pub output: &'static Schema,
pub capabilities: u64,
pub mutation: bool,
pub revision_required: bool,
pub undo: bool,
pub transaction: Option<&'static str>,
pub cancellable: bool,
pub command_id: Option<u32>,
pub access: Access,
}Expand description
A static semantic action contract. Register each implementation once in its host.
Fields§
§name: &'static strStable, language-independent identifier, e.g. document.text.replace.
description: &'static strDescription for human and automated discovery.
input: &'static SchemaValidated input schema.
output: &'static SchemaValidated completed-result schema.
capabilities: u64Bit set of platform services required by this action; defined by the platform layer.
mutation: boolWhether the action can change application or document state.
revision_required: boolRequire an expected revision for external mutation calls.
undo: boolWhether the operation is integrated with the application’s undo history.
transaction: Option<&'static str>Transaction domain, or None when atomic batches are unsupported.
cancellable: boolWhether the operation can return a cancellable task.
command_id: Option<u32>Optional compatible numeric GUI command identifier.
access: AccessWho may run it through external control; hosts may tighten it (Host::access).
Implementations§
Source§impl ActionSpec
impl ActionSpec
Sourcepub const fn read(name: &'static str, description: &'static str) -> Self
pub const fn read(name: &'static str, description: &'static str) -> Self
Parameterless read action with a general structured-object result.
Sourcepub const fn local_only(self) -> Self
pub const fn local_only(self) -> Self
Only trusted in-process GUI calls; external control is refused.