pub struct Request { /* private fields */ }Available on crate feature
recognize_text only.Expand description
Shared VNRequest configuration.
Implementations§
Source§impl Request
impl Request
Sourcepub const fn recognize_text() -> Self
pub const fn recognize_text() -> Self
Build a text-recognition request backed by VNRecognizeTextRequest.
Sourcepub const fn kind(&self) -> RequestKind
pub const fn kind(&self) -> RequestKind
Return the underlying request kind.
Sourcepub const fn with_recognition_level(
self,
recognition_level: RecognitionLevel,
) -> Self
pub const fn with_recognition_level( self, recognition_level: RecognitionLevel, ) -> Self
Select the OCR recognition strategy.
Sourcepub const fn with_language_correction(self, enabled: bool) -> Self
pub const fn with_language_correction(self, enabled: bool) -> Self
Enable or disable language correction.
Sourcepub const fn with_prefer_background_processing(self, enabled: bool) -> Self
pub const fn with_prefer_background_processing(self, enabled: bool) -> Self
Mirror VNRequest.preferBackgroundProcessing.
Sourcepub const fn with_uses_cpu_only(self, enabled: bool) -> Self
pub const fn with_uses_cpu_only(self, enabled: bool) -> Self
Mirror VNRequest.usesCPUOnly.
Sourcepub const fn with_revision(self, revision: usize) -> Self
pub const fn with_revision(self, revision: usize) -> Self
Override the request revision.
pub const fn recognition_level(&self) -> RecognitionLevel
pub const fn uses_language_correction(&self) -> bool
pub const fn prefer_background_processing(&self) -> bool
pub const fn uses_cpu_only(&self) -> bool
pub const fn revision(&self) -> Option<usize>
Trait Implementations§
impl Eq for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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