Skip to main content

JobState

Enum JobState 

Source
pub enum JobState {
    Queued,
    Running,
    Succeeded,
    Dead,
}
Expand description

Where a QueuedJob stands.

Variants§

§

Queued

Waiting for its run_at, or for its lane.

§

Running

Held by a worker until its locked_until.

§

Succeeded

§

Dead

Out of attempts: it runs again only when someone queues it again.

Implementations§

Source§

impl JobState

Source

pub const ALL: &'static [Self]

Every option, in declaration order.

Source

pub const fn value(&self) -> &'static str

The value this option posts, and a String column stores.

Source

pub fn label(&self) -> Text

The label this option reads as, in the request’s locale where it renders.

Source

pub fn from_value(value: &str) -> Option<Self>

The option storing value, if any.

Trait Implementations§

Source§

impl Assign<JobState> for JobState

Source§

fn into_assignment(self) -> Assignment<JobState>

Convert into an [Assignment<T>] value.
§

fn assign(self, assignments: &mut Assignments, projection: Projection)
where Self: Sized,

Record one or more assignments into the given [Assignments] map at the specified projection.
Source§

impl Clone for JobState

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for JobState

Source§

impl Debug for JobState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Embed for JobState

Source§

fn id() -> ModelId

Unique identifier for this embedded type within the schema. Read more
Source§

fn schema() -> Model

Returns the schema definition for this embedded type.
§

fn path_root() -> Path<Self, Self>
where Self: Sized,

An identity [Path] rooted at this embedded type. Read more
§

fn path_field<U>(index: usize) -> Path<Self, U>
where Self: Sized,

A [Path] from this embedded type to the field at index.
Source§

impl Eq for JobState

Source§

impl Field for JobState

Source§

type ExprTarget = JobState

The expression-level type of this field. Read more
Source§

type Path<__Origin> = JobStateFields<__Origin>

The type returned when accessing this field from a Fields struct. For primitives, this is Path<Origin, Self>. For embedded types, this is {Type}Fields.
Source§

type ListPath<__Origin> = JobStateListFields<__Origin>

The type returned when accessing this field from a list Fields struct. For primitives, this is Path<Origin, ListSelf::ExprTarget>. For embedded types, this is {Type}ListFields.
Source§

type Update<'a> = ()

The type of the update builder for this field. For embedded types, this is {Type}Update<’a>. For primitives, this will be {Type}Update<’a> once implemented.
Source§

type Inner = JobState

The unwrapped type used for foreign key filter expressions. Primitives map to themselves. Wrappers like Option<T>, Box<T>, Arc<T>, and Rc<T> map to T::Inner.
Source§

fn new_path<__Origin>(path: Path<__Origin, Self>) -> Self::Path<__Origin>

Build a field path from a raw path of the field’s [Self::ExprTarget]. Read more
Source§

fn new_list_path<__Origin>( path: Path<__Origin, List<Self::ExprTarget>>, ) -> Self::ListPath<__Origin>

Build a list field path from a raw path. For primitives, returns the path as-is. For embedded types, wraps the path in a ListFields struct.
Source§

fn new_update<'a>( _assignments: &'a mut Assignments, _projection: Projection, ) -> Self::Update<'a>

Build an update builder from assignments and a projection. For primitives, this returns () (no builder). For embedded types, this is overridden to construct the {Type}Update builder.
Source§

fn field_ty(storage_ty: Option<Type>) -> FieldTy

Returns the app-level field type for this primitive. Default implementation returns a Primitive field type. Embedded types override this to return Embedded field type.
Source§

fn key_constraint<__Origin>( &self, target: Path<__Origin, Self::Inner>, ) -> Expr<bool>

Build a boolean filter expression comparing this field value against a target path. Used by generated belongs-to accessors to build FK lookups. Read more
Source§

fn register(model_set: &mut ModelSet)

Register any models referenced by this field type into the given [ModelSet]. Read more
§

const NULLABLE: bool = false

Whether or not the type is nullable
§

const DEFERRED: bool = false

Whether this field is omitted from default loads.
Source§

impl FormScalar for JobState

Source§

fn parse_form(value: &str) -> Result<Self, Text>

Parse a trimmed, non-empty submission, or return the error message.
Source§

fn to_form(&self) -> String

The form spelling of a stored value: a TypedValue’s form_spelling.
Source§

fn to_label(&self) -> Text

What a column cell and a group header read: the form spelling, or an Options enum’s label.
Source§

fn color(&self) -> Option<Color>

The color a badge shows the value in: an Options enum’s #[option(color = "…")], and None for any other type.
Source§

const INPUT_TYPE: &'static str = "text"

The type attribute of the text control that edits it.
Source§

const STEP: Option<&'static str> = None

The control’s step attribute, when its input type takes one.
Source§

const SORTABLE: bool = true

Whether the database orders the stored column as the values order: a TypedValue’s SORTABLE, and true for any other type.
Source§

fn input_value(stored: &str, zone: &TimeZone) -> String

The control’s value for a stored value’s form spelling, shown in the request’s time zone zone: a TypedValue’s input_value, and the spelling itself for any other type.
Source§

fn form_value(posted: &str, zone: &TimeZone) -> String

The form spelling of what the control posted, read in the request’s time zone zone: a TypedValue’s form_value, and the posted text itself for any other type.
Source§

fn icon(&self) -> Option<IconData>

The icon a column shows the value with: an Options enum’s #[option(icon = …)], and None for any other type.
Source§

fn order(&self, _other: &Self) -> Option<Ordering>

How self orders against other for a text field’s min and max: a TypedValue’s order, and None for any other type.
Source§

impl IndexableField for JobState

Source§

impl IntoExpr<JobState> for JobState

Source§

fn into_expr(self) -> Expr<JobState>

Consume self and produce an [Expr<T>]. Read more
Source§

fn by_ref(&self) -> Expr<JobState>

Produce an [Expr<T>] from a reference without consuming self. Read more
Source§

impl Load for JobState

Source§

type Output = JobState

The concrete type produced by load. Read more
Source§

fn ty() -> Type

Returns the [stmt::Type] that describes values of this type.
Source§

fn load(value: Value) -> Result<Self>

Deserialize a database Value into Self::Output. Read more
Source§

fn reload(target: &mut Self, value: Value) -> Result<()>

Reload the value in-place from a value returned by the database. Read more
§

fn ty_relation() -> Type

Returns the [stmt::Type] used when this type appears as a relation target. The default delegates to ty().
§

fn load_relation(value: Value) -> Result<Self::Output, Error>

Deserialize a value that was loaded as a relation target. Read more
Source§

impl Options for JobState

Source§

fn options() -> Vec<(String, Text)>

Every option as (value, label), in declaration order.
Source§

fn faces() -> Vec<(String, Option<Color>, Option<IconData>)>

Each option’s #[option(color = "…")] and #[option(icon = …)] as (value, color, icon), which a choice drawn as buttons shows its options in; none when no option names either.
Source§

fn label_of(value: &str) -> Text

The label of a value, or value itself when no option has it: a String row written before an option was renamed still reads.
Source§

impl PartialEq for JobState

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Scalar for JobState

Source§

impl StructuralPartialEq for JobState

Auto Trait Implementations§

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
§

impl<T> AnyEq for T
where T: Any + PartialEq,

§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

§

fn as_any(&self) -> &(dyn Any + 'static)

§

impl<T> Assign<Arc<T>> for T
where T: IntoExpr<T>,

§

fn into_assignment(self) -> Assignment<Arc<T>>

Convert into an [Assignment<T>] value.
§

fn assign(self, assignments: &mut Assignments, projection: Projection)
where Self: Sized,

Record one or more assignments into the given [Assignments] map at the specified projection.
§

impl<T> Assign<Box<T>> for T
where T: IntoExpr<T>,

§

fn into_assignment(self) -> Assignment<Box<T>>

Convert into an [Assignment<T>] value.
§

fn assign(self, assignments: &mut Assignments, projection: Projection)
where Self: Sized,

Record one or more assignments into the given [Assignments] map at the specified projection.
§

impl<T> Assign<Option<T>> for T
where T: IntoExpr<T>,

§

fn into_assignment(self) -> Assignment<Option<T>>

Convert into an [Assignment<T>] value.
§

fn assign(self, assignments: &mut Assignments, projection: Projection)
where Self: Sized,

Record one or more assignments into the given [Assignments] map at the specified projection.
§

impl<T> Assign<Rc<T>> for T
where T: IntoExpr<T>,

§

fn into_assignment(self) -> Assignment<Rc<T>>

Convert into an [Assignment<T>] value.
§

fn assign(self, assignments: &mut Assignments, projection: Projection)
where Self: Sized,

Record one or more assignments into the given [Assignments] map at the specified projection.
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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> FilterKey for T
where T: FormScalar + IntoExpr<T> + Send + Sync + 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> IntoExpr<Arc<T>> for T
where T: IntoExpr<T>,

§

fn into_expr(self) -> Expr<Arc<T>>

Consume self and produce an [Expr<T>]. Read more
§

fn by_ref(&self) -> Expr<Arc<T>>

Produce an [Expr<T>] from a reference without consuming self. Read more
§

impl<T> IntoExpr<Box<T>> for T
where T: IntoExpr<T>,

§

fn into_expr(self) -> Expr<Box<T>>

Consume self and produce an [Expr<T>]. Read more
§

fn by_ref(&self) -> Expr<Box<T>>

Produce an [Expr<T>] from a reference without consuming self. Read more
§

impl<T> IntoExpr<Option<T>> for T
where T: IntoExpr<T>,

§

fn into_expr(self) -> Expr<Option<T>>

Consume self and produce an [Expr<T>]. Read more
§

fn by_ref(&self) -> Expr<Option<T>>

Produce an [Expr<T>] from a reference without consuming self. Read more
§

impl<T> IntoExpr<Rc<T>> for T
where T: IntoExpr<T>,

§

fn into_expr(self) -> Expr<Rc<T>>

Consume self and produce an [Expr<T>]. Read more
§

fn by_ref(&self) -> Expr<Rc<T>>

Produce an [Expr<T>] from a reference without consuming self. Read more
Source§

impl<T> IntoFormValue for T
where T: FormScalar,

Source§

fn into_form_value(self) -> FormValue

The value as its control posts it.
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more