pub struct PostgresMigrator { /* private fields */ }Implementations§
Source§impl PostgresMigrator
impl PostgresMigrator
pub fn new( database_url: impl Into<String>, migrations_path: impl Into<PathBuf>, ) -> PostgresMigrator
pub fn from_source( database_url: impl Into<String>, migrations: impl MigrationSource + 'static, ) -> PostgresMigrator
pub fn embedded<I, N, S>( database_url: impl Into<String>, migrations: I, ) -> PostgresMigrator
pub fn database_url(&self) -> &str
pub fn migration_source(&self) -> &dyn MigrationSource
pub fn migration_directory(&self) -> Option<&MigrationDirectory>
pub async fn applied_migrations( &self, ) -> Result<Vec<AppliedMigration>, MigratorError>
pub async fn apply_all(&self) -> Result<ApplyMigrationsReport, MigratorError>
pub async fn generate_migration<S>(
&self,
migration_name: &str,
) -> Result<Option<GeneratedMigration>, MigratorError>where
S: SchemaAccess,
pub async fn plan_migration<S>(
&self,
) -> Result<PostgresMigration, MigratorError>where
S: SchemaAccess,
Trait Implementations§
Source§impl Clone for PostgresMigrator
impl Clone for PostgresMigrator
Source§fn clone(&self) -> PostgresMigrator
fn clone(&self) -> PostgresMigrator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PostgresMigrator
impl !RefUnwindSafe for PostgresMigrator
impl Send for PostgresMigrator
impl Sync for PostgresMigrator
impl Unpin for PostgresMigrator
impl UnsafeUnpin for PostgresMigrator
impl !UnwindSafe for PostgresMigrator
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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