Skip to content

Commit cc0f23a

Browse files
Artur-Romaniuktshakah
authored andcommitted
added mock data description in common.rs
1 parent 0c1be6c commit cc0f23a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ use std::{
2020
/// Note that the implementation uses an `Arc<Mutex<...>>` internally, so a
2121
/// cloned instance of the mock can be used to check the expectations of the
2222
/// original instance that has been moved into a driver.
23+
///
24+
/// Optional Data type allows for storage of arbitrary state data in mocks.
25+
/// Mock data can be accessed via appropriate getter/setter methods, i.e. `mock_data()` and `set_mock_data()`.
26+
///
2327
#[derive(Debug, Clone)]
2428
pub struct Generic<T: Clone + Debug + PartialEq, Data = ()> {
2529
expected: Arc<Mutex<VecDeque<T>>>,

0 commit comments

Comments
 (0)