pub struct Registry { /* private fields */ }Expand description
Every versioned kind with its migration steps.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn builtin() -> Self
pub fn builtin() -> Self
The kinds of this build (M56 inventory). Each kind’s current version equals the constant its module reads and writes (checked by a test).
Sourcepub fn with_step(self, name: &str, step: Step) -> Self
pub fn with_step(self, name: &str, step: Step) -> Self
Appends a migration step to kind name, raising its current version
by one. Panics on an unknown kind (a programming error).
Sourcepub fn with_after_commit(self, hook: AfterCommit) -> Self
pub fn with_after_commit(self, hook: AfterCommit) -> Self
Test hook: hook runs after a migration’s store commit and before
its working-tree writes, so a test can stop the migration in its
worst place and check that the next run converges.
pub fn kinds(&self) -> &[Kind]
pub fn kind(&self, name: &str) -> Option<&Kind>
Trait Implementations§
Auto Trait Implementations§
impl Forget for Registry
impl Freeze for Registry
impl Move for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registrywhere
RawVecInner: Sync,
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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