Skip to main content

Operation

Trait Operation 

Source
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§

Source

const KIND: &'static str

The name programs store its steps under.

Required Associated Types§

Source

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§

Source

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".

Implementors§