pub trait Operation: 'static {
type Args: Serialize + DeserializeOwned + 'static;
const KIND: &'static str;
// Required method
fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> GeopResult<()>;
}Expand description
One kind of step. An operation is a unit struct: everything a step of it needs is in its arguments.
Required Associated Constants§
Required Associated Types§
Sourcetype Args: Serialize + DeserializeOwned + 'static
type Args: Serialize + DeserializeOwned + 'static
What a step of the operation is given. It is saved with the program, so it names targets and elements, never holds their internal ids.
Required Methods§
Sourcefn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> GeopResult<()>
Declares what the step produces, through ctx (see
StepContext::produce): cheap, since it runs in every run. What
takes work is done in the makes, which run only when what they read
changed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".