1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! A mock implementation of `EventpOps` generated by [mockall].
//! See the [mockall] documentation for more information.
//!
//! # Examples
//!
//! ```rust
//! use mockall::predicate;
//! use eventp::{interest, EventpOps, mock::MockEventp};
//!
//! // Create a new mock object.
//! let mut mock = MockEventp::new();
//!
//! // Set an expectation for the `modify` method.
//! // It expects to be called exactly once with fd=5 and EPOLLIN.
//! // When called, it will return Ok(()).
//! mock.expect_modify()
//! .with(predicate::eq(5), predicate::eq(interest().read()))
//! .times(1)
//! .returning(|_fd, _interest| Ok(()));
//!
//! // Call the method. This will be checked against the expectation.
//! let result = mock.modify(5, interest().read());
//!
//! // Assert that the call was successful.
//! assert!(result.is_ok());
//!
//! // When `mock` goes out of scope at the end of this block, mockall will
//! // verify that all expectations were met (e.g., that `modify` was called exactly once).
//! ```
use io;
use RawFd;
use crateThinBoxSubscriber;
use crate::;
mock!