pub struct TestStateStore { /* private fields */ }Implementations§
Source§impl TestStateStore
impl TestStateStore
pub fn new() -> Self
pub fn get(&self, key: &EncodedKey) -> Option<&EncodedRow>
pub fn set(&mut self, key: EncodedKey, value: EncodedRow)
pub fn remove(&mut self, key: &EncodedKey) -> Option<EncodedRow>
pub fn contains(&self, key: &EncodedKey) -> bool
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn clear(&mut self)
pub fn keys(&self) -> Vec<&EncodedKey>
pub fn entries(&self) -> Vec<(&EncodedKey, &EncodedRow)>
pub fn decode_value( &self, key: &EncodedKey, shape: &RowShape, ) -> Option<Vec<Value>>
pub fn decode_named_value( &self, key: &EncodedKey, shape: &RowShape, ) -> Option<HashMap<String, Value>>
pub fn set_value(&mut self, key: EncodedKey, values: &[Value], shape: &RowShape)
pub fn set_named_value( &mut self, key: EncodedKey, values: &HashMap<String, Value>, shape: &RowShape, )
pub fn snapshot(&self) -> HashMap<EncodedKey, EncodedRow>
pub fn restore(&mut self, snapshot: HashMap<EncodedKey, EncodedRow>)
pub fn assert_value( &self, key: &EncodedKey, expected: &[Value], shape: &RowShape, )
pub fn assert_exists(&self, key: &EncodedKey)
pub fn assert_not_exists(&self, key: &EncodedKey)
pub fn assert_count(&self, expected: usize)
Trait Implementations§
Source§impl Assertable for TestStateStore
impl Assertable for TestStateStore
type Assertion<'a> = StateAssertion<'a> where Self: 'a
fn assert(&self) -> StateAssertion<'_>
Source§impl Clone for TestStateStore
impl Clone for TestStateStore
Source§fn clone(&self) -> TestStateStore
fn clone(&self) -> TestStateStore
Returns a duplicate of the value. Read more
1.0.0 · 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 TestStateStore
impl Debug for TestStateStore
Source§impl Default for TestStateStore
impl Default for TestStateStore
Source§fn default() -> TestStateStore
fn default() -> TestStateStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TestStateStore
impl RefUnwindSafe for TestStateStore
impl Send for TestStateStore
impl Sync for TestStateStore
impl Unpin for TestStateStore
impl UnsafeUnpin for TestStateStore
impl UnwindSafe for TestStateStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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