pub struct Config<'a, 'b> {
pub data_dir: Option<&'a CStr>,
pub languages: &'b CStr,
pub ocr_engine_mode: OcrEngineMode,
}Expand description
OCR configuration.
Fields§
§data_dir: Option<&'a CStr>Data directory where language-specific training data is stored.
If not specified, the TESSDATA_PREFIX environment variable is used instead.
If the variable isn’t defined, the build-time default is used.
languages: &'b CStrLanguages are specified by their three-letter ISO codes separated by ‘+’ symbol.
English is the default.
ocr_engine_mode: OcrEngineModeOCR engine mode. LSTM is the default.
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'b> Freeze for Config<'a, 'b>
impl<'a, 'b> RefUnwindSafe for Config<'a, 'b>
impl<'a, 'b> Send for Config<'a, 'b>
impl<'a, 'b> Sync for Config<'a, 'b>
impl<'a, 'b> Unpin for Config<'a, 'b>
impl<'a, 'b> UnsafeUnpin for Config<'a, 'b>
impl<'a, 'b> UnwindSafe for Config<'a, 'b>
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