pub struct StoreStack { /* private fields */ }Expand description
A composed middleware stack for state store operations.
Built via StoreStack::builder(). Same observer/transform/guard
ordering as DispatchStack.
Implementations§
Source§impl StoreStack
impl StoreStack
Sourcepub fn builder() -> StoreStackBuilder
pub fn builder() -> StoreStackBuilder
Start building a store middleware stack.
Sourcepub async fn write_with(
&self,
scope: &Scope,
key: &str,
value: Value,
options: Option<&StoreOptions>,
terminal: &dyn StoreWriteNext,
) -> Result<(), StateError>
pub async fn write_with( &self, scope: &Scope, key: &str, value: Value, options: Option<&StoreOptions>, terminal: &dyn StoreWriteNext, ) -> Result<(), StateError>
Write through the middleware chain, ending at terminal.
Sourcepub async fn read_with(
&self,
scope: &Scope,
key: &str,
terminal: &dyn StoreReadNext,
) -> Result<Option<Value>, StateError>
pub async fn read_with( &self, scope: &Scope, key: &str, terminal: &dyn StoreReadNext, ) -> Result<Option<Value>, StateError>
Read through the middleware chain, ending at terminal.
Auto Trait Implementations§
impl Freeze for StoreStack
impl !RefUnwindSafe for StoreStack
impl Send for StoreStack
impl Sync for StoreStack
impl Unpin for StoreStack
impl UnsafeUnpin for StoreStack
impl !UnwindSafe for StoreStack
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