pub struct DeviceSampleStore { /* private fields */ }Expand description
In-memory sample/content store used by deterministic device tests.
Implementations§
Source§impl DeviceSampleStore
impl DeviceSampleStore
Sourcepub fn insert_content(&mut self, key: StoreKey, value: Expr)
pub fn insert_content(&mut self, key: StoreKey, value: Expr)
Inserts referenced content.
Sourcepub fn insert_sample(&mut self, sample: StoredSample)
pub fn insert_sample(&mut self, sample: StoredSample)
Inserts a stored sample.
Sourcepub fn contains_sample(&self, key: &StoreKey) -> bool
pub fn contains_sample(&self, key: &StoreKey) -> bool
Returns true when a sample is present.
Sourcepub fn contains_content(&self, key: &StoreKey) -> bool
pub fn contains_content(&self, key: &StoreKey) -> bool
Returns true when referenced content is present.
Sourcepub fn sample_len(&self) -> usize
pub fn sample_len(&self) -> usize
Returns the number of stored samples.
Sourcepub fn sample(&self, key: &StoreKey) -> Option<&StoredSample>
pub fn sample(&self, key: &StoreKey) -> Option<&StoredSample>
Returns a stored sample by key.
Sourcepub fn content_len(&self) -> usize
pub fn content_len(&self) -> usize
Returns the number of referenced content entries.
Trait Implementations§
Source§impl Clone for DeviceSampleStore
impl Clone for DeviceSampleStore
Source§fn clone(&self) -> DeviceSampleStore
fn clone(&self) -> DeviceSampleStore
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 DeviceSampleStore
impl Debug for DeviceSampleStore
Source§impl Default for DeviceSampleStore
impl Default for DeviceSampleStore
Source§fn default() -> DeviceSampleStore
fn default() -> DeviceSampleStore
Returns the “default value” for a type. Read more
Source§impl PartialEq for DeviceSampleStore
impl PartialEq for DeviceSampleStore
impl StructuralPartialEq for DeviceSampleStore
Auto Trait Implementations§
impl Freeze for DeviceSampleStore
impl RefUnwindSafe for DeviceSampleStore
impl Send for DeviceSampleStore
impl Sync for DeviceSampleStore
impl Unpin for DeviceSampleStore
impl UnsafeUnpin for DeviceSampleStore
impl UnwindSafe for DeviceSampleStore
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