pub struct ReplayEngine<'a> { /* private fields */ }Expand description
Replays migration graphs into schema state with contextual replay errors.
Implementations§
Source§impl<'a> ReplayEngine<'a>
impl<'a> ReplayEngine<'a>
Sourcepub fn new(graph: &'a MigrationGraph) -> Self
pub fn new(graph: &'a MigrationGraph) -> Self
Create a replay helper over a migration graph.
Sourcepub fn replay_ids(&self, ids: &[String]) -> Result<Schema, ReplayError>
pub fn replay_ids(&self, ids: &[String]) -> Result<Schema, ReplayError>
Replay the provided migration ids into schema state.
Sourcepub fn replay_with_sources(
&self,
ordered_ids: &[String],
) -> Result<ReplaySources, ReplayError>
pub fn replay_with_sources( &self, ordered_ids: &[String], ) -> Result<ReplaySources, ReplayError>
Replay migration ids and return source metadata for dependency planning.
Sourcepub fn apply_migration(
schema: &mut Schema,
migration: &Migration,
) -> Result<(), ReplayError>
pub fn apply_migration( schema: &mut Schema, migration: &Migration, ) -> Result<(), ReplayError>
Apply one migration to a schema with migration/operation error context.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ReplayEngine<'a>
impl<'a> RefUnwindSafe for ReplayEngine<'a>
impl<'a> Send for ReplayEngine<'a>
impl<'a> Sync for ReplayEngine<'a>
impl<'a> Unpin for ReplayEngine<'a>
impl<'a> UnsafeUnpin for ReplayEngine<'a>
impl<'a> UnwindSafe for ReplayEngine<'a>
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