pub struct MemoryStorage { /* private fields */ }Expand description
In-memory storage implementation - perfect for WASM and testing
Implementations§
Source§impl MemoryStorage
impl MemoryStorage
pub fn new() -> Self
pub fn with_initial_rules(rules: RewriteRulesState) -> Self
Trait Implementations§
Source§impl Debug for MemoryStorage
impl Debug for MemoryStorage
Source§impl Default for MemoryStorage
impl Default for MemoryStorage
Source§impl StateStorage for MemoryStorage
impl StateStorage for MemoryStorage
type Error = MemoryStorageError
fn save_timestamp_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
state: &'life1 TimestampState,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_timestamp_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<TimestampState, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_rewrite_rules_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
state: &'life1 RewriteRulesState,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_rewrite_rules_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RewriteRulesState, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_pending_edits_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
state: &'life1 PendingEditsState,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_pending_edits_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PendingEditsState, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_pending_rewrite_rules_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
state: &'life1 PendingRewriteRulesState,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_pending_rewrite_rules_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<PendingRewriteRulesState, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save_settings_state<'life0, 'life1, 'async_trait>(
&'life0 mut self,
state: &'life1 SettingsState,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_settings_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SettingsState, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for MemoryStorage
impl RefUnwindSafe for MemoryStorage
impl Send for MemoryStorage
impl Sync for MemoryStorage
impl Unpin for MemoryStorage
impl UnsafeUnpin for MemoryStorage
impl UnwindSafe for MemoryStorage
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