Metadata

Trait Metadata 

Source
pub trait Metadata {
Show 18 methods // Required methods fn version(&self) -> i32; fn version_mut(&mut self) -> &mut i32; fn app_version(&self) -> &str; fn app_version_mut(&mut self) -> &mut String; fn status(&self) -> MetaStatus; fn status_mut(&mut self) -> &mut MetaStatus; fn created_at(&self) -> &str; fn created_at_mut(&mut self) -> &mut String; fn updated_at(&self) -> &str; fn updated_at_mut(&mut self) -> &mut String; // Provided methods fn to_status_str(&self) -> &str { ... } fn touch_updated(&mut self) { ... } fn set_version(&mut self, v: i32) { ... } fn set_app_version(&mut self, v: String) { ... } fn set_status(&mut self, s: MetaStatus) { ... } fn mark_clean(&mut self) { ... } fn mark_migrating(&mut self) { ... } fn mark_failed(&mut self) { ... }
}

Required Methods§

Source

fn version(&self) -> i32

Migration version.

Source

fn version_mut(&mut self) -> &mut i32

Source

fn app_version(&self) -> &str

Application version. By default, it is the project package.version field (Cargo).

Source

fn app_version_mut(&mut self) -> &mut String

Source

fn status(&self) -> MetaStatus

Migration status.

Source

fn status_mut(&mut self) -> &mut MetaStatus

Source

fn created_at(&self) -> &str

Creation date (first usage).

Source

fn created_at_mut(&mut self) -> &mut String

Source

fn updated_at(&self) -> &str

Last update date.

Source

fn updated_at_mut(&mut self) -> &mut String

Provided Methods§

Source

fn to_status_str(&self) -> &str

Get the status as a string.

Source

fn touch_updated(&mut self)

Update updated_at with current time.

Source

fn set_version(&mut self, v: i32)

Set the version and update updated_at.

Source

fn set_app_version(&mut self, v: String)

Set the app_version and update updated_at.

Source

fn set_status(&mut self, s: MetaStatus)

Set the status and update updated_at.

Source

fn mark_clean(&mut self)

Set the status to Clean and update updated_at.

Source

fn mark_migrating(&mut self)

Set the status to Migrating and update updated_at.

Source

fn mark_failed(&mut self)

Set the status to Failed and update updated_at.

Implementors§