Skip to main content

Step

Struct Step 

Source
pub struct Step {
    pub intent: String,
    pub precondition: Option<Condition>,
    pub action: Action,
    pub fallback: Option<Action>,
    pub expect: Condition,
    pub timeout: Option<Duration>,
    pub retry: RetryPolicy,
    pub on_failure: OnFailure,
    pub on_success: OnSuccess,
}
Expand description

A single automation intent: execute an action, then wait for an expected UI state.

Fields§

§intent: String

Human-readable label shown in logs, e.g. "click the Save button".

§precondition: Option<Condition>

Optional guard evaluated before the action. If false, the step is skipped (not an error). Useful for conditional steps such as “dismiss dialog if it appeared”.

§action: Action

The UI action to perform: click, type text, press a key, close a window, etc.

§fallback: Option<Action>

Optional fallback action run when expect times out on the primary action. After the fallback runs, expect is re-polled once with a fresh timeout. If it succeeds, the step succeeds; otherwise on_failure decides what happens.

§expect: Condition

Condition that must become true after the action for the step to succeed. Polled every 100 ms until satisfied or the timeout elapses.

§timeout: Option<Duration>

Maximum time to wait for expect to become true. Overrides the workflow default. Accepts duration strings such as "5s", "300ms", "2m".

§retry: RetryPolicy

Retry policy on timeout. Overrides the workflow default. Default: none — falls back to the workflow-level default.

§on_failure: OnFailure

What to do when this step fails (expect condition times out, or fallback also fails). Default: abort — propagate the error and stop the phase.

§on_success: OnSuccess

What to do immediately after this step succeeds. Default: continue — proceed to the next step.

Trait Implementations§

Source§

impl<'de> Deserialize<'de> for Step

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for Step

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more

Auto Trait Implementations§

§

impl Freeze for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnsafeUnpin for Step

§

impl UnwindSafe for Step

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,