Struct ckb_db_migration::Migrations
source · [−]pub struct Migrations { /* private fields */ }
Expand description
TODO(doc): @quake
Implementations
sourceimpl Migrations
impl Migrations
sourcepub fn add_migration(&mut self, migration: Box<dyn Migration>)
pub fn add_migration(&mut self, migration: Box<dyn Migration>)
TODO(doc): @quake
sourcepub fn check(&self, db: &ReadOnlyDB) -> Ordering
pub fn check(&self, db: &ReadOnlyDB) -> Ordering
Check if database’s version is matched with the executable binary version.
Returns
- Less: The database version is less than the matched version of the executable binary. Requires migration.
- Equal: The database version is matched with the executable binary version.
- Greater: The database version is greater than the matched version of the executable binary. Requires upgrade the executable binary.
sourcepub fn expensive(&self, db: &ReadOnlyDB) -> bool
pub fn expensive(&self, db: &ReadOnlyDB) -> bool
Check if the migrations will consume a lot of time.
Trait Implementations
sourceimpl Default for Migrations
impl Default for Migrations
sourcefn default() -> Migrations
fn default() -> Migrations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for Migrations
impl !Send for Migrations
impl !Sync for Migrations
impl Unpin for Migrations
impl !UnwindSafe for Migrations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more