Trait migrate_state::StateGuard[][src]

pub trait StateGuard {
    fn client(&mut self) -> &mut dyn StateClient;
#[must_use] fn unlock<'async_trait>(
        self: Box<Self>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }
Expand description

Object returned from StateLock::lock() that holds state storage lock while alive, preventing concurrent access to it from multiple threads and processes.

Required methods

Returns the StateClient to be used to access the migration state while this StateGuard hold the lock.

Unlocks currently held migration state lock allowing for other subjects to acquire it with StateLock::lock() once again

Implementors