pub struct ParseTimer { /* private fields */ }Expand description
Timer to limit parsing time
Implementations§
Source§impl ParseTimer
impl ParseTimer
Sourcepub fn check(&self) -> Result<(), LimitError>
pub fn check(&self) -> Result<(), LimitError>
Check if time is exceeded
Sourcepub fn elapsed_ms(&self) -> u64
pub fn elapsed_ms(&self) -> u64
Elapsed time in ms
Sourcepub fn remaining_ms(&self) -> u64
pub fn remaining_ms(&self) -> u64
Remaining time in ms
Auto Trait Implementations§
impl Freeze for ParseTimer
impl RefUnwindSafe for ParseTimer
impl Send for ParseTimer
impl Sync for ParseTimer
impl Unpin for ParseTimer
impl UnwindSafe for ParseTimer
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