pub struct ReadChecker { /* private fields */ }Expand description
ReadChecker is used to check the correctness of the read process.
Implementations§
Source§impl ReadChecker
impl ReadChecker
Sourcepub fn new(size: usize) -> Self
pub fn new(size: usize) -> Self
Create a new read checker by given size and range.
It’s by design that we use a random generator to generate the raw data. The content of data is not important, we only care about the correctness of the read process.
Sourcepub async fn check(&mut self, r: Reader, actions: &[ReadAction])
pub async fn check(&mut self, r: Reader, actions: &[ReadAction])
Check will check the correctness of the read process via given actions.
Check will panic if any check failed.
Auto Trait Implementations§
impl !Freeze for ReadChecker
impl RefUnwindSafe for ReadChecker
impl Send for ReadChecker
impl Sync for ReadChecker
impl Unpin for ReadChecker
impl UnsafeUnpin for ReadChecker
impl UnwindSafe for ReadChecker
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