Skip to main content

Command

Trait Command 

Source
pub trait Command: Interaction {
    type Args;

    // Required method
    fn require(args: &Self::Args) -> Result<(), ()>;
}
Expand description

A command (ridl §6).

Required Associated Types§

Source

type Args

The argument type.

Required Methods§

Source

fn require(args: &Self::Args) -> Result<(), ()>

Evaluates the command’s require clauses. Ok when every clause is true or the command declares none. Err when a clause is false, which the provider reports as Contract::PreconditionFailed.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§