pub struct GivenBehaviour {
pub stmt_id: usize,
pub bound: Rc<dyn Any>,
/* private fields */
}Expand description
Stores the state of a given behaviour.
Fields§
§stmt_id: usizeThe unique id of the behaviour within the mocked method to which it belongs.
bound: Rc<dyn Any>The bound variables available to the behaviour’s ArgMatcher.
Implementations§
Source§impl GivenBehaviour
impl GivenBehaviour
Sourcepub fn with(stmt_id: usize, bound: Rc<dyn Any>, stmt_repr: &str) -> Self
pub fn with(stmt_id: usize, bound: Rc<dyn Any>, stmt_repr: &str) -> Self
Creates a new behaviour which is never exhausted.
Sourcepub fn with_times(
times: usize,
stmt_id: usize,
bound: Rc<dyn Any>,
stmt_repr: &str,
) -> Self
pub fn with_times( times: usize, stmt_id: usize, bound: Rc<dyn Any>, stmt_repr: &str, ) -> Self
Creates a new behaviour which is never exhausted after being matched times.
Sourcepub fn is_saturated(&self) -> bool
pub fn is_saturated(&self) -> bool
Returns true iff the behaviour is exhausted.
Auto Trait Implementations§
impl !Freeze for GivenBehaviour
impl !RefUnwindSafe for GivenBehaviour
impl !Send for GivenBehaviour
impl !Sync for GivenBehaviour
impl !UnwindSafe for GivenBehaviour
impl Unpin for GivenBehaviour
impl UnsafeUnpin for GivenBehaviour
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