pub trait InternalVerb: 'static {
type Input: DeserializeOwned + Send + 'static;
type Output: Serialize + Send + 'static;
const ID: &'static str;
const CATEGORY: VerbCategory;
}Expand description
One internal verb. Implementors are zero-sized marker types (e.g.
pub struct CloudVpsCreate;); the associated Input / Output types
carry the wire shape.
Per W144 D1, schemas are derived from the Rust types via schemars at
registration time — see [VerbDescriptor::for_verb]. The trait itself
stays schema-agnostic so the crate doesn’t pull schemars unconditionally.
Example (will land in R409-T3):
ⓘ
pub struct CloudVpsCreate;
#[derive(serde::Deserialize, schemars::JsonSchema)]
pub struct CloudVpsCreateInput { /* ... */ }
#[derive(serde::Serialize, schemars::JsonSchema)]
pub struct CloudVpsCreateOutput { /* ... */ }
impl InternalVerb for CloudVpsCreate {
type Input = CloudVpsCreateInput;
type Output = CloudVpsCreateOutput;
const ID: &'static str = "cloud.vps.create";
const CATEGORY: VerbCategory = VerbCategory::Cloud;
}Required Associated Constants§
Sourceconst ID: &'static str
const ID: &'static str
Stable verb id, e.g. "cloud.vps.create". Must begin with
Self::CATEGORY.as_str() followed by '.'.
Sourceconst CATEGORY: VerbCategory
const CATEGORY: VerbCategory
Verb category — drives namespace and tool naming.
Required Associated Types§
Sourcetype Input: DeserializeOwned + Send + 'static
type Input: DeserializeOwned + Send + 'static
Wire input type. Typically derives Deserialize + schemars::JsonSchema.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".