pub struct KeyedStatefulTestHelper { /* private fields */ }Expand description
Test helper for FFIKeyedStateful operators
Implementations§
Source§impl KeyedStatefulTestHelper
impl KeyedStatefulTestHelper
Sourcepub fn new(layout: EncodedValuesLayout) -> Self
pub fn new(layout: EncodedValuesLayout) -> Self
Create a new keyed stateful test helper
Sourcepub fn set_state<K>(&mut self, key: K, values: &[Value])where
K: IntoEncodedKey,
pub fn set_state<K>(&mut self, key: K, values: &[Value])where
K: IntoEncodedKey,
Set state for a key
Sourcepub fn get_state<K>(&self, key: K) -> Option<Vec<Value>>where
K: IntoEncodedKey,
pub fn get_state<K>(&self, key: K) -> Option<Vec<Value>>where
K: IntoEncodedKey,
Get state for a key
Sourcepub fn assert_state<K>(&self, key: K, expected: &[Value])where
K: IntoEncodedKey,
pub fn assert_state<K>(&self, key: K, expected: &[Value])where
K: IntoEncodedKey,
Assert state for a key matches expected values
Sourcepub fn remove_state<K>(&mut self, key: K) -> Option<Vec<Value>>where
K: IntoEncodedKey,
pub fn remove_state<K>(&mut self, key: K) -> Option<Vec<Value>>where
K: IntoEncodedKey,
Remove state for a key
Sourcepub fn has_state<K>(&self, key: K) -> boolwhere
K: IntoEncodedKey,
pub fn has_state<K>(&self, key: K) -> boolwhere
K: IntoEncodedKey,
Check if a key has state
Sourcepub fn state_count(&self) -> usize
pub fn state_count(&self) -> usize
Get the number of keys with state
Sourcepub fn keys(&self) -> Vec<&EncodedKey>
pub fn keys(&self) -> Vec<&EncodedKey>
Get all keys
Sourcepub fn assert_count(&self, expected: usize)
pub fn assert_count(&self, expected: usize)
Assert the number of states
Auto Trait Implementations§
impl Freeze for KeyedStatefulTestHelper
impl RefUnwindSafe for KeyedStatefulTestHelper
impl Send for KeyedStatefulTestHelper
impl Sync for KeyedStatefulTestHelper
impl Unpin for KeyedStatefulTestHelper
impl UnwindSafe for KeyedStatefulTestHelper
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