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§
fn kind(&self) -> &'static str
Sourcefn check_args(&self, args: &Value) -> GeopResult<()>
fn check_args(&self, args: &Value) -> GeopResult<()>
Whether args are arguments of the operation, as saved.
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".