pub struct TestCacheDatabaseControl { /* private fields */ }Expand description
Shared control and observation handle for TestCacheDatabase.
Implementations§
Source§impl TestCacheDatabaseControl
impl TestCacheDatabaseControl
Sourcepub fn create() -> (TestCacheDatabase, Self)
pub fn create() -> (TestCacheDatabase, Self)
Creates an adapter and its shared control handle.
Sourcepub fn set_actor_state(
&self,
component_id: ComponentId,
state: &IndexMap<String, Vec<u8>>,
)
pub fn set_actor_state( &self, component_id: ComponentId, state: &IndexMap<String, Vec<u8>>, )
Seeds actor state for a later load.
Sourcepub fn set_strategy_state(
&self,
strategy_id: StrategyId,
state: &IndexMap<String, Vec<u8>>,
)
pub fn set_strategy_state( &self, strategy_id: StrategyId, state: &IndexMap<String, Vec<u8>>, )
Seeds strategy state for a later load.
Sourcepub fn actor_state(
&self,
component_id: &ComponentId,
) -> Option<IndexMap<String, Vec<u8>>>
pub fn actor_state( &self, component_id: &ComponentId, ) -> Option<IndexMap<String, Vec<u8>>>
Returns persisted actor state.
Sourcepub fn strategy_state(
&self,
strategy_id: &StrategyId,
) -> Option<IndexMap<String, Vec<u8>>>
pub fn strategy_state( &self, strategy_id: &StrategyId, ) -> Option<IndexMap<String, Vec<u8>>>
Returns persisted strategy state.
Sourcepub fn set_fail_load_actor(&self, fail: bool)
pub fn set_fail_load_actor(&self, fail: bool)
Configures actor loads to fail.
Sourcepub fn set_fail_load_strategy(&self, fail: bool)
pub fn set_fail_load_strategy(&self, fail: bool)
Configures strategy loads to fail.
Sourcepub fn set_fail_update_actor(&self, fail: bool)
pub fn set_fail_update_actor(&self, fail: bool)
Configures actor updates to fail.
Sourcepub fn set_fail_update_strategy(&self, fail: bool)
pub fn set_fail_update_strategy(&self, fail: bool)
Configures strategy updates to fail.
Trait Implementations§
Source§impl Clone for TestCacheDatabaseControl
impl Clone for TestCacheDatabaseControl
Source§fn clone(&self) -> TestCacheDatabaseControl
fn clone(&self) -> TestCacheDatabaseControl
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 TestCacheDatabaseControl
impl Debug for TestCacheDatabaseControl
Source§impl Default for TestCacheDatabaseControl
impl Default for TestCacheDatabaseControl
Source§fn default() -> TestCacheDatabaseControl
fn default() -> TestCacheDatabaseControl
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TestCacheDatabaseControl
impl RefUnwindSafe for TestCacheDatabaseControl
impl Send for TestCacheDatabaseControl
impl Sync for TestCacheDatabaseControl
impl Unpin for TestCacheDatabaseControl
impl UnsafeUnpin for TestCacheDatabaseControl
impl UnwindSafe for TestCacheDatabaseControl
Blanket Implementations§
impl<T> Allocation for T
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