pub struct Runner<'a> { /* private fields */ }Expand description
Driver around a Connection that knows how to read / write the
schema_migrations ledger and apply pending migrations.
Implementations§
Source§impl<'a> Runner<'a>
impl<'a> Runner<'a>
pub fn new(conn: &'a Connection) -> Self
Sourcepub fn ensure_table(&self) -> Result<()>
pub fn ensure_table(&self) -> Result<()>
Ensure the bookkeeping table exists. Idempotent — safe to call on every CLI invocation.
Sourcepub fn status(&self) -> Result<Status>
pub fn status(&self) -> Result<Status>
Snapshot of (applied, pending) migrations vs the ALL registry.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Runner<'a>
impl<'a> !Send for Runner<'a>
impl<'a> !Sync for Runner<'a>
impl<'a> !UnwindSafe for Runner<'a>
impl<'a> Freeze for Runner<'a>
impl<'a> Unpin for Runner<'a>
impl<'a> UnsafeUnpin for Runner<'a>
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