Enum fang::FangTaskState
source · pub enum FangTaskState {
New,
InProgress,
Failed,
Finished,
Retried,
}
Expand description
Possible states of the task
Variants§
New
The task is ready to be executed
InProgress
The task is being executed.
The task may stay in this state forever if an unexpected error happened
Failed
The task failed
Finished
The task finished successfully
Retried
The task is being retried. It means it failed but it’s scheduled to be executed again
Trait Implementations§
source§impl<'a> AsExpression<FangTaskStateEnum> for &'a FangTaskState
impl<'a> AsExpression<FangTaskStateEnum> for &'a FangTaskState
§type Expression = Bound<FangTaskStateEnum, &'a FangTaskState>
type Expression = Bound<FangTaskStateEnum, &'a FangTaskState>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<FangTaskStateEnum> for FangTaskState
impl AsExpression<FangTaskStateEnum> for FangTaskState
§type Expression = Bound<FangTaskStateEnum, FangTaskState>
type Expression = Bound<FangTaskStateEnum, FangTaskState>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'a> AsExpression<Nullable<FangTaskStateEnum>> for &'a FangTaskState
impl<'a> AsExpression<Nullable<FangTaskStateEnum>> for &'a FangTaskState
§type Expression = Bound<Nullable<FangTaskStateEnum>, &'a FangTaskState>
type Expression = Bound<Nullable<FangTaskStateEnum>, &'a FangTaskState>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl AsExpression<Nullable<FangTaskStateEnum>> for FangTaskState
impl AsExpression<Nullable<FangTaskStateEnum>> for FangTaskState
§type Expression = Bound<Nullable<FangTaskStateEnum>, FangTaskState>
type Expression = Bound<Nullable<FangTaskStateEnum>, FangTaskState>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl Clone for FangTaskState
impl Clone for FangTaskState
source§fn clone(&self) -> FangTaskState
fn clone(&self) -> FangTaskState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FangTaskState
impl Debug for FangTaskState
source§impl Default for FangTaskState
impl Default for FangTaskState
source§fn default() -> FangTaskState
fn default() -> FangTaskState
Returns the “default value” for a type. Read more
source§impl<'a> FromSql<'a> for FangTaskState
impl<'a> FromSql<'a> for FangTaskState
source§fn from_sql(
_type: &Type,
buf: &'a [u8]
) -> Result<FangTaskState, Box<dyn Error + Sync + Send>>
fn from_sql( _type: &Type, buf: &'a [u8] ) -> Result<FangTaskState, Box<dyn Error + Sync + Send>>
Creates a new value of this type from a buffer of data of the specified
Postgres
Type
in its binary format. Read moresource§fn accepts(type_: &Type) -> bool
fn accepts(type_: &Type) -> bool
Determines if a value of this type can be created from the specified
Postgres
Type
.source§impl FromSql<FangTaskStateEnum, Pg> for FangTaskState
impl FromSql<FangTaskStateEnum, Pg> for FangTaskState
source§impl PartialEq<FangTaskState> for FangTaskState
impl PartialEq<FangTaskState> for FangTaskState
source§fn eq(&self, other: &FangTaskState) -> bool
fn eq(&self, other: &FangTaskState) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Queryable<FangTaskStateEnum, Pg> for FangTaskState
impl Queryable<FangTaskStateEnum, Pg> for FangTaskState
source§impl ToSql<FangTaskStateEnum, Pg> for FangTaskState
impl ToSql<FangTaskStateEnum, Pg> for FangTaskState
source§impl<DB> ToSql<Nullable<FangTaskStateEnum>, DB> for FangTaskStatewhere
DB: Backend,
Self: ToSql<FangTaskStateEnum, DB>,
impl<DB> ToSql<Nullable<FangTaskStateEnum>, DB> for FangTaskStatewhere DB: Backend, Self: ToSql<FangTaskStateEnum, DB>,
source§impl ToSql for FangTaskState
impl ToSql for FangTaskState
source§fn to_sql(
&self,
_type: &Type,
buf: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql( &self, _type: &Type, buf: &mut BytesMut ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
Converts the value of
self
into the binary format of the specified
Postgres Type
, appending it to out
. Read moresource§fn accepts(type_: &Type) -> bool
fn accepts(type_: &Type) -> bool
Determines if a value of this type can be converted to the specified
Postgres
Type
.source§fn to_sql_checked(
&self,
ty: &Type,
out: &mut BytesMut
) -> Result<IsNull, Box<dyn Error + Sync + Send>>
fn to_sql_checked( &self, ty: &Type, out: &mut BytesMut ) -> Result<IsNull, Box<dyn Error + Sync + Send>>
An adaptor method used internally by Rust-Postgres. Read more
source§fn encode_format(&self, _ty: &Type) -> Format
fn encode_format(&self, _ty: &Type) -> Format
Specify the encode format
impl Eq for FangTaskState
impl StructuralEq for FangTaskState
impl StructuralPartialEq for FangTaskState
Auto Trait Implementations§
impl RefUnwindSafe for FangTaskState
impl Send for FangTaskState
impl Sync for FangTaskState
impl Unpin for FangTaskState
impl UnwindSafe for FangTaskState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> BorrowToSql for Twhere
T: ToSql,
impl<T> BorrowToSql for Twhere T: ToSql,
source§fn borrow_to_sql(&self) -> &dyn ToSql
fn borrow_to_sql(&self) -> &dyn ToSql
Returns a reference to
self
as a ToSql
trait object.source§impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere
T: Queryable<ST, DB>,
ST: SqlTypeOrSelectable,
DB: Backend,
<T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
impl<T, ST, DB> FromSqlRow<ST, DB> for Twhere T: Queryable<ST, DB>, ST: SqlTypeOrSelectable, DB: Backend, <T as Queryable<ST, DB>>::Row: FromStaticSqlRow<ST, DB>,
source§impl<T, ST, DB> FromStaticSqlRow<ST, DB> for Twhere
DB: Backend,
T: FromSql<ST, DB>,
ST: SingleValue,
impl<T, ST, DB> FromStaticSqlRow<ST, DB> for Twhere DB: Backend, T: FromSql<ST, DB>, ST: SingleValue,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> Self::Expressionwhere Self: AsExpression<T> + Sized, T: SqlType + TypedExpressionType,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,
Convert
&self
to an expression for Diesel’s query builder. Read moresource§impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere
ST: SqlTypeOrSelectable + TupleSize,
T: Queryable<ST, DB>,
DB: Backend,
impl<T, ST, DB> StaticallySizedRow<ST, DB> for Twhere ST: SqlTypeOrSelectable + TupleSize, T: Queryable<ST, DB>, DB: Backend,
source§const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
const FIELD_COUNT: usize = <ST as crate::util::TupleSize>::SIZE
The number of fields that this type will consume.