pub struct MockSet { /* private fields */ }Expand description
Mock set implementation for testing RedisSet operations.
Implementations§
Source§impl MockSet
impl MockSet
Sourcepub fn enable_error_mode(&self, message: &str)
pub fn enable_error_mode(&self, message: &str)
Enables error mode for testing error handling.
Sourcepub fn disable_error_mode(&self)
pub fn disable_error_mode(&self)
Disables error mode.
Sourcepub async fn remove_items(&self, items: &[String]) -> Result<()>
pub async fn remove_items(&self, items: &[String]) -> Result<()>
Removes items from the set.
Sourcepub async fn remove_item(&self, item: &str) -> Result<()>
pub async fn remove_item(&self, item: &str) -> Result<()>
Removes a single item from the set.
Sourcepub async fn load_items(&self) -> Result<Vec<String>>
pub async fn load_items(&self) -> Result<Vec<String>>
Returns all items in the set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockSet
impl RefUnwindSafe for MockSet
impl Send for MockSet
impl Sync for MockSet
impl Unpin for MockSet
impl UnsafeUnpin for MockSet
impl UnwindSafe for MockSet
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