pub struct Monitor<C> { /* private fields */ }Expand description
Monitor tracks text recognition progress and can be used to set the timeout.
Implementations§
Source§impl<C: FnMut(i32) -> bool> Monitor<C>
impl<C: FnMut(i32) -> bool> Monitor<C>
Sourcepub fn with_cancel_callback(cancel: C) -> Self
pub fn with_cancel_callback(cancel: C) -> Self
Creates new monitor with cancel callback.
Sourcepub fn get_cancel_callback(&mut self) -> &mut C
pub fn get_cancel_callback(&mut self) -> &mut C
Returns cancel callback.
Source§impl<C> Monitor<C>
impl<C> Monitor<C>
Sourcepub fn set_progress_callback_raw(&mut self, callback: TessProgressFunc)
pub fn set_progress_callback_raw(&mut self, callback: TessProgressFunc)
Set progress callback function.
Sourcepub fn get_progress(&self) -> u32
pub fn get_progress(&self) -> u32
Get progress in [0; 100] range.
Sourcepub fn set_timeout(&mut self, timeout: Duration)
pub fn set_timeout(&mut self, timeout: Duration)
Set text recognition timeout.
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for Monitor<C>
impl<C> RefUnwindSafe for Monitor<C>where
C: RefUnwindSafe,
impl<C> !Send for Monitor<C>
impl<C> !Sync for Monitor<C>
impl<C> Unpin for Monitor<C>
impl<C> UnsafeUnpin for Monitor<C>
impl<C> UnwindSafe for Monitor<C>where
C: UnwindSafe,
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