Enum xio_webapi::JobEvent

source ·
pub enum JobEvent {
    Started {
        job: String,
        tags: BTreeMap<String, Vec<String>>,
        instant: u64,
    },
    Data {
        tag: String,
        values: Vec<DataValueDescriptive>,
        instant: u64,
    },
    Position {
        command: u16,
        caption: String,
        instant: u64,
    },
    Stopped {
        details: JobStoppedReason,
        instant: u64,
    },
}
Expand description

An enum representing events that can occur during job execution.

Variants

Started

Fields

job: String

The job identifier string.

tags: BTreeMap<String, Vec<String>>

A definition of the tags and the field names for each tag.

instant: u64

The number of milliseconds since the job started.

Execution of a job has started.

Data

Fields

tag: String

The tag of the data.

values: Vec<DataValueDescriptive>

The data values.

The values are sorted in the same order as the tags field by the JobEvent::Started variant.

instant: u64

The number of milliseconds since the job started.

A data row was recorded.

Position

Fields

command: u16

The command position index.

caption: String

The caption string of the current position.

instant: u64

The number of milliseconds since the job started.

The job execution has reached a new position.

Stopped

Fields

details: JobStoppedReason

The details about why the job has stopped.

instant: u64

The number of milliseconds since the job started.

The currently running job has stopped.

Implementations

Get the instant of the event (in milliseconds since job start).

Get the instant of the event (duration since job start).

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Load the data structure from a path.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.