Skip to main content

ErasedOperation

Trait ErasedOperation 

Source
pub trait ErasedOperation {
    // Required methods
    fn kind(&self) -> &'static str;
    fn check_args(&self, args: &Value) -> GeopResult<()>;
    fn run(&self, ctx: &mut StepContext<'_>, args: &Value) -> GeopResult<()>;
}
Expand description

An Operation with its types erased, so that operations of all kinds can be kept in one crate::operation_registry::OperationRegistry. Every operation is one, through its value. Arguments come as saved.

Required Methods§

Source

fn kind(&self) -> &'static str

Source

fn check_args(&self, args: &Value) -> GeopResult<()>

Whether args are arguments of the operation, as saved.

Source

fn run(&self, ctx: &mut StepContext<'_>, args: &Value) -> GeopResult<()>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§