Trait migrate_state::StateGuard [−][src]
pub trait StateGuard {
fn client(&mut self) -> &mut dyn StateClient;
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 while alive
holds the lock on the state storage preventing concurrent access to it
from multiple threads and processes.
Required methods
fn client(&mut self) -> &mut dyn StateClient
fn client(&mut self) -> &mut dyn StateClient
Returns the StateClient
to be used to access the migration state
while this StateGuard
hold the lock.