pub struct RegionText {
pub text: String,
pub needs_ocr: bool,
pub ocr_reason: Option<String>,
}Expand description
Result for a single region’s text extraction.
Fields§
§text: StringExtracted text (may be empty if region has no text items).
needs_ocr: booltrue when the text should not be trusted and OCR should be used instead.
Set when: the region is empty, the page uses GID-encoded fonts, or the
extracted text fails garbage/encoding checks.
ocr_reason: Option<String>Machine-readable OCR reason when the cause is known.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RegionText
impl RefUnwindSafe for RegionText
impl Send for RegionText
impl Sync for RegionText
impl Unpin for RegionText
impl UnsafeUnpin for RegionText
impl UnwindSafe for RegionText
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more