[−][src]Struct refinery::Migration
Represents a schema migration to be run on the database,
this struct is used by the embed_migrations!
and include_migration_mods!
macros to gather migration files
and shouldn't be needed by the user
Implementations
impl Migration
[src]
pub fn unapplied(input_name: &str, sql: &str) -> Result<Migration, Error>
[src]
Create an unapplied migration, name and version are parsed from the input_name, which must be named in the format (U|V){1}__{2}.rs where {1} represents the migration version and {2} the name.
pub fn version(&self) -> u32
[src]
Get the Migration version
pub fn prefix(&self) -> &Type
[src]
Get the Prefix
pub fn name(&self) -> &str
[src]
Get the Migration Name
pub fn applied_on(&self) -> Option<&DateTime<Local>>
[src]
Get the Migration Name
pub fn checksum(&self) -> u64
[src]
Get the Migration checksum. Checksum is formed from the name version and sql of the Migration
Trait Implementations
impl Clone for Migration
[src]
impl Debug for Migration
[src]
impl Display for Migration
[src]
impl Eq for Migration
[src]
impl Ord for Migration
[src]
pub fn cmp(&self, other: &Migration) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Migration> for Migration
[src]
pub fn eq(&self, other: &Migration) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Migration> for Migration
[src]
pub fn partial_cmp(&self, other: &Migration) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for Migration
[src]
impl Send for Migration
[src]
impl Sync for Migration
[src]
impl Unpin for Migration
[src]
impl UnwindSafe for Migration
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,