Struct galvanic_mock_lib::GivenBehaviour
[−]
[src]
pub struct GivenBehaviour { pub stmt_id: usize, pub bound: Rc<Any>, // some fields omitted }
Stores the state of a given behaviour.
Fields
stmt_id: usize
The unique id of the behaviour within the mocked method to which it belongs.
bound: Rc<Any>
The bound variables available to the behaviour's ArgMatcher
.
Methods
impl GivenBehaviour
[src]
fn with(stmt_id: usize, bound: Rc<Any>, stmt_repr: &str) -> Self
[src]
Creates a new behaviour which is never exhausted.
fn with_times(
times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
[src]
times: usize,
stmt_id: usize,
bound: Rc<Any>,
stmt_repr: &str
) -> Self
Creates a new behaviour which is never exhausted after being matched times
.
fn matched(&self)
[src]
Notifies the behaviour that it has been matched.
fn is_saturated(&self) -> bool
[src]
Returns true
iff the behaviour is exhausted.
fn describe(&self) -> &str
[src]
Returns a description of the behaviour.