#[non_exhaustive]pub struct Hints {
pub language_hints: Vec<String>,
/* private fields */
}Expand description
Hints for OCR Engine
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.language_hints: Vec<String>List of BCP-47 language codes to use for OCR. In most cases, not specifying it yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong).
Implementations§
Source§impl Hints
impl Hints
pub fn new() -> Self
Sourcepub fn set_language_hints<T, V>(self, v: T) -> Self
pub fn set_language_hints<T, V>(self, v: T) -> Self
Sets the value of language_hints.
§Example
ⓘ
let x = Hints::new().set_language_hints(["a", "b", "c"]);Trait Implementations§
impl StructuralPartialEq for Hints
Auto Trait Implementations§
impl Freeze for Hints
impl RefUnwindSafe for Hints
impl Send for Hints
impl Sync for Hints
impl Unpin for Hints
impl UnwindSafe for Hints
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