pub struct MigrationBuilder { /* private fields */ }Expand description
Builder for migration operations
Implementations§
Source§impl MigrationBuilder
impl MigrationBuilder
Sourcepub fn with_config(self, config: Config) -> Self
pub fn with_config(self, config: Config) -> Self
Set the configuration
Sourcepub fn with_type_introspection(self, method: TypeIntrospectionMethod) -> Self
pub fn with_type_introspection(self, method: TypeIntrospectionMethod) -> Self
Set the type introspection method
Sourcepub fn with_sources<P: AsRef<Path>>(
self,
paths: impl IntoIterator<Item = P>,
) -> Self
pub fn with_sources<P: AsRef<Path>>( self, paths: impl IntoIterator<Item = P>, ) -> Self
Add source paths to process
Sourcepub fn with_source<P: AsRef<Path>>(self, path: P) -> Self
pub fn with_source<P: AsRef<Path>>(self, path: P) -> Self
Add a single source path
Sourcepub fn with_target_module(self, module: ModuleName) -> Self
pub fn with_target_module(self, module: ModuleName) -> Self
Set the target module for replacements
Sourcepub fn with_replacement(
self,
qualified_name: QualifiedName,
info: ReplaceInfo,
) -> Self
pub fn with_replacement( self, qualified_name: QualifiedName, info: ReplaceInfo, ) -> Self
Add replacement info
Sourcepub fn with_replacements_from_collector(
self,
collector_result: CollectorResult,
) -> Self
pub fn with_replacements_from_collector( self, collector_result: CollectorResult, ) -> Self
Add multiple replacements from a collector result
Sourcepub fn with_performance_monitoring(self, enable: bool) -> Self
pub fn with_performance_monitoring(self, enable: bool) -> Self
Enable performance monitoring
Sourcepub fn write_changes(self, write: bool) -> Self
pub fn write_changes(self, write: bool) -> Self
Enable writing changes to files
Sourcepub fn with_current_version(self, version: Version) -> Self
pub fn with_current_version(self, version: Version) -> Self
Set current version for version-based operations
Sourcepub fn execute(self) -> Result<MigrationResult>
pub fn execute(self) -> Result<MigrationResult>
Build and execute the migration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MigrationBuilder
impl RefUnwindSafe for MigrationBuilder
impl Send for MigrationBuilder
impl Sync for MigrationBuilder
impl Unpin for MigrationBuilder
impl UnsafeUnpin for MigrationBuilder
impl UnwindSafe for MigrationBuilder
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