pub struct ValkeyStateStore { /* private fields */ }Implementations§
Source§impl ValkeyStateStore
impl ValkeyStateStore
pub async fn new(url: impl AsRef<str>) -> Result<Self, RedisError>
Sourcepub async fn resilient(
url: impl AsRef<str>,
) -> Result<ResilientStateStore<Self>, ValkeyStoreError>
pub async fn resilient( url: impl AsRef<str>, ) -> Result<ResilientStateStore<Self>, ValkeyStoreError>
Creates a Valkey-backed store that permanently falls back to an in-process mirror after connection-class failures.
pub async fn with_prefix( url: impl AsRef<str>, key_prefix: impl Into<String>, ) -> Result<Self, RedisError>
pub async fn from_client( client: Client, key_prefix: impl Into<String>, ) -> Result<Self, RedisError>
pub async fn with_prefix_resilient( url: impl AsRef<str>, key_prefix: impl Into<String>, ) -> Result<ResilientStateStore<Self>, ValkeyStoreError>
pub async fn from_client_resilient( client: Client, key_prefix: impl Into<String>, ) -> Result<ResilientStateStore<Self>, ValkeyStoreError>
Trait Implementations§
Source§impl Clone for ValkeyStateStore
impl Clone for ValkeyStateStore
Source§fn clone(&self) -> ValkeyStateStore
fn clone(&self) -> ValkeyStateStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValkeyStateStore
impl Debug for ValkeyStateStore
Source§impl StateStore for ValkeyStateStore
impl StateStore for ValkeyStateStore
type Error = ValkeyStoreError
async fn load(&self, job_id: &str) -> Result<Option<JobState>, Self::Error>
async fn save(&self, state: &JobState) -> Result<(), Self::Error>
async fn delete(&self, job_id: &str) -> Result<(), Self::Error>
fn classify_error(error: &Self::Error) -> StoreErrorKindwhere
Self: Sized,
fn drain_events( &self, ) -> impl Future<Output = Result<Vec<StoreEvent>, Self::Error>> + Send
Auto Trait Implementations§
impl Freeze for ValkeyStateStore
impl !RefUnwindSafe for ValkeyStateStore
impl Send for ValkeyStateStore
impl Sync for ValkeyStateStore
impl Unpin for ValkeyStateStore
impl UnsafeUnpin for ValkeyStateStore
impl !UnwindSafe for ValkeyStateStore
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