pub struct GraphileWorkerMigration {
pub name: &'static str,
pub is_breaking: bool,
pub stmts: &'static [&'static str],
}Fields§
§name: &'static str§is_breaking: bool§stmts: &'static [&'static str]Implementations§
Source§impl GraphileWorkerMigration
impl GraphileWorkerMigration
pub fn name(&self) -> &'static str
pub fn is_breaking(&self) -> bool
Sourcepub fn migration_number(&self) -> u32
pub fn migration_number(&self) -> u32
Parses the migration name and returns the migration number.
use graphile_worker_migrations_core::GraphileWorkerMigration;
let migration = GraphileWorkerMigration {
name: "m000001_initial",
..Default::default()
};
assert_eq!(migration.migration_number(), 1);
let migration = GraphileWorkerMigration {
name: "m000002",
..Default::default()
};
assert_eq!(migration.migration_number(), 2);Trait Implementations§
Source§impl Default for GraphileWorkerMigration
impl Default for GraphileWorkerMigration
Source§fn default() -> GraphileWorkerMigration
fn default() -> GraphileWorkerMigration
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GraphileWorkerMigration
impl RefUnwindSafe for GraphileWorkerMigration
impl Send for GraphileWorkerMigration
impl Sync for GraphileWorkerMigration
impl Unpin for GraphileWorkerMigration
impl UnsafeUnpin for GraphileWorkerMigration
impl UnwindSafe for GraphileWorkerMigration
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more