Struct diesel::migration::MigrationVersion
source · pub struct MigrationVersion<'a>(_);
Expand description
A migration version identifier
This is used by the migration harness to place migrations in order, therefore two different instances of this type must be sortable
Implementations§
source§impl<'a> MigrationVersion<'a>
impl<'a> MigrationVersion<'a>
sourcepub fn as_owned(&self) -> MigrationVersion<'static>
pub fn as_owned(&self) -> MigrationVersion<'static>
Convert the current migration version into an owned variant with static life time
Trait Implementations§
source§impl<'expr, 'a> AsExpression<Nullable<Text>> for &'expr MigrationVersion<'a>
impl<'expr, 'a> AsExpression<Nullable<Text>> for &'expr MigrationVersion<'a>
§type Expression = Bound<Nullable<Text>, &'expr MigrationVersion<'a>>
type Expression = Bound<Nullable<Text>, &'expr MigrationVersion<'a>>
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<Text>> for MigrationVersion<'a>
impl<'a> AsExpression<Nullable<Text>> for MigrationVersion<'a>
§type Expression = Bound<Nullable<Text>, MigrationVersion<'a>>
type Expression = Bound<Nullable<Text>, MigrationVersion<'a>>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'expr, 'a> AsExpression<Text> for &'expr MigrationVersion<'a>
impl<'expr, 'a> AsExpression<Text> for &'expr MigrationVersion<'a>
§type Expression = Bound<Text, &'expr MigrationVersion<'a>>
type Expression = Bound<Text, &'expr MigrationVersion<'a>>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'a> AsExpression<Text> for MigrationVersion<'a>
impl<'a> AsExpression<Text> for MigrationVersion<'a>
§type Expression = Bound<Text, MigrationVersion<'a>>
type Expression = Bound<Text, MigrationVersion<'a>>
The expression being returned
source§fn as_expression(self) -> Self::Expression
fn as_expression(self) -> Self::Expression
Perform the conversion
source§impl<'a> Debug for MigrationVersion<'a>
impl<'a> Debug for MigrationVersion<'a>
source§impl<'a> Display for MigrationVersion<'a>
impl<'a> Display for MigrationVersion<'a>
source§impl<'a> From<&'a String> for MigrationVersion<'a>
impl<'a> From<&'a String> for MigrationVersion<'a>
source§impl<'a> From<&'a str> for MigrationVersion<'a>
impl<'a> From<&'a str> for MigrationVersion<'a>
source§impl<'a> From<String> for MigrationVersion<'a>
impl<'a> From<String> for MigrationVersion<'a>
source§impl<'a, DB> FromSql<Text, DB> for MigrationVersion<'a>where
String: FromSql<Text, DB>,
DB: Backend,
impl<'a, DB> FromSql<Text, DB> for MigrationVersion<'a>where String: FromSql<Text, DB>, DB: Backend,
source§impl<'a> Hash for MigrationVersion<'a>
impl<'a> Hash for MigrationVersion<'a>
source§impl<'a> Ord for MigrationVersion<'a>
impl<'a> Ord for MigrationVersion<'a>
source§fn cmp(&self, other: &MigrationVersion<'a>) -> Ordering
fn cmp(&self, other: &MigrationVersion<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a> PartialEq<MigrationVersion<'a>> for MigrationVersion<'a>
impl<'a> PartialEq<MigrationVersion<'a>> for MigrationVersion<'a>
source§fn eq(&self, other: &MigrationVersion<'a>) -> bool
fn eq(&self, other: &MigrationVersion<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd<MigrationVersion<'a>> for MigrationVersion<'a>
impl<'a> PartialOrd<MigrationVersion<'a>> for MigrationVersion<'a>
source§fn partial_cmp(&self, other: &MigrationVersion<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &MigrationVersion<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a, __ST, __DB> Queryable<__ST, __DB> for MigrationVersion<'a>where
__DB: Backend,
__ST: SingleValue,
Self: FromSql<__ST, __DB>,
impl<'a, __ST, __DB> Queryable<__ST, __DB> for MigrationVersion<'a>where __DB: Backend, __ST: SingleValue, Self: FromSql<__ST, __DB>,
source§impl<'a, __DB> ToSql<Nullable<Text>, __DB> for MigrationVersion<'a>where
__DB: Backend,
Self: ToSql<Text, __DB>,
impl<'a, __DB> ToSql<Nullable<Text>, __DB> for MigrationVersion<'a>where __DB: Backend, Self: ToSql<Text, __DB>,
source§impl<'a, DB> ToSql<Text, DB> for MigrationVersion<'a>where
Cow<'a, str>: ToSql<Text, DB>,
DB: Backend,
impl<'a, DB> ToSql<Text, DB> for MigrationVersion<'a>where Cow<'a, str>: ToSql<Text, DB>, DB: Backend,
impl<'a> Eq for MigrationVersion<'a>
impl<'a> StructuralEq for MigrationVersion<'a>
impl<'a> StructuralPartialEq for MigrationVersion<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for MigrationVersion<'a>
impl<'a> Send for MigrationVersion<'a>
impl<'a> Sync for MigrationVersion<'a>
impl<'a> Unpin for MigrationVersion<'a>
impl<'a> UnwindSafe for MigrationVersion<'a>
Blanket Implementations§
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> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> AsExprOf<Self, T>where
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> AsExprOf<Self, T>where 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) -> AsExprOf<&'a Self, T>where
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T>where &'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 =
const FIELD_COUNT: usize =
The number of fields that this type will consume.