pub struct StateStore {
pub config: Config,
}Fields§
§config: ConfigImplementations§
Source§impl StateStore
impl StateStore
pub fn new(config: Config) -> Self
pub fn read(&self) -> Result<RuntimeState, StateError>
pub fn lock(&self, timeout: Duration) -> Result<LockGuard, StateError>
pub fn lock_with( &self, timeout: Duration, alive: impl Fn(u32) -> bool, ) -> Result<LockGuard, StateError>
pub fn write( &self, guard: &LockGuard, state: &RuntimeState, ) -> Result<(), StateError>
pub fn compare_and_write( &self, guard: &LockGuard, expected: &RuntimeState, next: &RuntimeState, ) -> Result<(), StateError>
Auto Trait Implementations§
impl Forget for StateStore
impl Freeze for StateStore
impl RefUnwindSafe for StateStore
impl Send for StateStore
impl Sync for StateStore
impl Unpin for StateStore
impl UnsafeUnpin for StateStore
impl UnwindSafe for StateStore
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