pub enum ConcreteStateManager {
Memory(MemoryStateManager),
Filesystem(FilesystemStateManager),
}Variants§
Memory(MemoryStateManager)
Filesystem(FilesystemStateManager)
Implementations§
Source§impl ConcreteStateManager
impl ConcreteStateManager
pub async fn save<T: Serialize + Send + Sync>( &self, node_id: &str, state: &T, ) -> Result<()>
pub async fn save_with_options<T: Serialize + Send + Sync>( &self, node_id: &str, state: &T, options: StateOptions, ) -> Result<()>
pub async fn load<T: DeserializeOwned + Send + Sync>( &self, node_id: &str, ) -> Result<Option<T>>
pub async fn load_versioned<T: DeserializeOwned + Send + Sync>( &self, node_id: &str, ) -> Result<Option<VersionedState<T>>>
pub async fn delete(&self, node_id: &str) -> Result<()>
pub async fn exists(&self, node_id: &str) -> Result<bool>
pub async fn list_nodes(&self) -> Result<Vec<String>>
pub async fn size(&self, node_id: &str) -> Result<Option<usize>>
pub async fn create_snapshot( &self, node_id: &str, description: Option<String>, ) -> Result<StateSnapshot>
pub async fn restore_snapshot(&self, snapshot_id: &str) -> Result<()>
pub async fn list_snapshots(&self, node_id: &str) -> Result<Vec<StateSnapshot>>
pub async fn delete_snapshot(&self, snapshot_id: &str) -> Result<()>
pub async fn compare_and_swap<T: Serialize + DeserializeOwned + Send + Sync>( &self, node_id: &str, expected: &T, new_value: &T, ) -> Result<bool>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ConcreteStateManager
impl !UnwindSafe for ConcreteStateManager
impl Freeze for ConcreteStateManager
impl Send for ConcreteStateManager
impl Sync for ConcreteStateManager
impl Unpin for ConcreteStateManager
impl UnsafeUnpin for ConcreteStateManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more