Skip to main content

ActivityDefinition

Trait ActivityDefinition 

Source
pub trait ActivityDefinition {
    type Input: TemporalDeserializable + TemporalSerializable + 'static;
    type Output: TemporalDeserializable + TemporalSerializable + 'static;

    // Required method
    fn name() -> &'static str
       where Self: Sized;
}
Expand description

Implement on a marker struct to define an activity.

Typically, you will want to use the #[activity] attribute within an #[activities] macro to define activities. However, this trait may be implemented manually if desired.

Required Associated Types§

Source

type Input: TemporalDeserializable + TemporalSerializable + 'static

Type of the input argument to the workflow

Source

type Output: TemporalDeserializable + TemporalSerializable + 'static

Type of the output of the workflow

Required Methods§

Source

fn name() -> &'static str
where Self: Sized,

The name that will be used for the activity type.

Implementors§