pub struct Db { /* private fields */ }Implementations§
Source§impl Db
impl Db
pub fn connect(config: &Config) -> Result<Db, Error>
pub fn create_migrations_table(&mut self) -> Result<(), Error>
pub fn list(&mut self) -> Result<Vec<MigrationWithMeta>, Error>
Sourcepub fn run(&mut self, migration: &Migration) -> Result<MigrationWithMeta, Error>
pub fn run(&mut self, migration: &Migration) -> Result<MigrationWithMeta, Error>
Panics if the INSERT statement does not return 1 row.
pub fn rollback_migration(&mut self, migration: &Migration) -> Result<(), Error>
Auto Trait Implementations§
impl !Freeze for Db
impl !RefUnwindSafe for Db
impl Send for Db
impl !Sync for Db
impl Unpin for Db
impl !UnwindSafe for Db
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