common_meta::ddl::drop_database

Trait State

source
pub(crate) trait State:
    Send
    + Debug
    + Serialize
    + Deserialize {
    // Required methods
    fn next<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        ddl_ctx: &'life1 DdlContext,
        ctx: &'life2 mut DropDatabaseContext,
    ) -> Pin<Box<dyn Future<Output = Result<(Box<dyn State>, Status)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn as_any(&self) -> &dyn Any;

    // Provided method
    fn recover(&mut self, _ddl_ctx: &DdlContext) -> Result<()> { ... }
}

Required Methods§

source

fn next<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, ddl_ctx: &'life1 DdlContext, ctx: &'life2 mut DropDatabaseContext, ) -> Pin<Box<dyn Future<Output = Result<(Box<dyn State>, Status)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Yields the next State and [Status].

source

fn as_any(&self) -> &dyn Any

Returns as Any.

Provided Methods§

source

fn recover(&mut self, _ddl_ctx: &DdlContext) -> Result<()>

The hook is called during the recovery.

Trait Implementations§

source§

impl<'typetag> Serialize for dyn State + 'typetag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'typetag> Serialize for dyn State + Send + 'typetag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'typetag> Serialize for dyn State + Send + Sync + 'typetag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'typetag> Serialize for dyn State + Sync + 'typetag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Implementors§