pub struct MigrationWriter { /* private fields */ }Expand description
Writes migrations to the filesystem.
Implementations§
Source§impl MigrationWriter
impl MigrationWriter
Sourcepub fn new(dir: impl Into<PathBuf>) -> Self
pub fn new(dir: impl Into<PathBuf>) -> Self
Create a new migration writer for the given directory.
Sourcepub fn with_format(self, format: MigrationFormat) -> Self
pub fn with_format(self, format: MigrationFormat) -> Self
Set the output format.
Sourcepub fn migrations_dir(&self) -> &Path
pub fn migrations_dir(&self) -> &Path
Get the migrations directory.
Sourcepub fn format(&self) -> MigrationFormat
pub fn format(&self) -> MigrationFormat
Get the output format.
Auto Trait Implementations§
impl Freeze for MigrationWriter
impl RefUnwindSafe for MigrationWriter
impl Send for MigrationWriter
impl Sync for MigrationWriter
impl Unpin for MigrationWriter
impl UnsafeUnpin for MigrationWriter
impl UnwindSafe for MigrationWriter
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).