pub struct MockState { /* private fields */ }
Expand description
Shared state for mock responses
Implementations§
Source§impl MockState
impl MockState
pub fn new(fail_on_empty: bool) -> Self
pub fn push_response(&mut self, response: MockResponse)
pub fn push_responses(&mut self, responses: Vec<MockResponse>)
pub fn next_response(&mut self) -> Result<MockResponse, AIError>
pub fn clear(&mut self)
pub fn remaining_count(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockState
impl RefUnwindSafe for MockState
impl Send for MockState
impl Sync for MockState
impl Unpin for MockState
impl UnwindSafe for MockState
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