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,
actor_id: ActorId,
state: &IndexMap<String, Vec<u8>>,
)
pub fn set_actor_state( &self, actor_id: ActorId, 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,
actor_id: &ActorId,
) -> Option<IndexMap<String, Vec<u8>>>
pub fn actor_state( &self, actor_id: &ActorId, ) -> 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.
Sourcepub fn set_fail_update_position(&self, fail: bool)
pub fn set_fail_update_position(&self, fail: bool)
Configures position 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 !RefUnwindSafe for TestCacheDatabaseControl
impl !UnwindSafe for TestCacheDatabaseControl
impl Freeze for TestCacheDatabaseControl
impl Send for TestCacheDatabaseControl
impl Sync for TestCacheDatabaseControl
impl Unpin for TestCacheDatabaseControl
impl UnsafeUnpin for TestCacheDatabaseControl
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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