Struct migrate_core::PlanBuilder [−][src]
pub struct PlanBuilder { /* fields omitted */ }
Expand description
Builder for Plan
to allow its convenient configuration
Implementations
Register MigrationCtxProvider
that will be used to provide
context for migrations in the built Plan
.
Append Migration
to the list of migrations configured for the plan.
Keep in mind that it is important to keep migrations in order
and add new migrations strictly to the end of the list so that new
migrations observe the changes from previous migrations.
Use forced stack lock.
Beware that setting it to true
is dangerous and may lead to migration
state corruptions!
See more detailed info at migrate_state::StateLock::lock()
.
Create builder for rendering the current migration configuration
in this PlanBuilder
.
Finish building migration plan.
This method reads the migration state and figures out which migrations
to run up()
or down
.
This information is stored in the returned Plan
struct.
There are various reasons for this method to fail, see PlanBuildError
for more details on possible error outcomes.
Auto Trait Implementations
impl !RefUnwindSafe for PlanBuilder
impl !Send for PlanBuilder
impl !Sync for PlanBuilder
impl Unpin for PlanBuilder
impl !UnwindSafe for PlanBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more