#[non_exhaustive]pub struct TextDetectionConfig {
pub language_hints: Vec<String>,
pub model: String,
/* private fields */
}Expand description
Config for TEXT_DETECTION.
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>Language hint can be specified if the language to be detected is known a priori. It can increase the accuracy of the detection. Language hint must be language code in BCP-47 format.
Automatic language detection is performed if no hint is provided.
model: StringModel to use for text detection. Supported values: “builtin/stable” (the default if unset) and “builtin/latest”.
Implementations§
Source§impl TextDetectionConfig
impl TextDetectionConfig
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 = TextDetectionConfig::new().set_language_hints(["a", "b", "c"]);Trait Implementations§
Source§impl Clone for TextDetectionConfig
impl Clone for TextDetectionConfig
Source§fn clone(&self) -> TextDetectionConfig
fn clone(&self) -> TextDetectionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextDetectionConfig
impl Debug for TextDetectionConfig
Source§impl Default for TextDetectionConfig
impl Default for TextDetectionConfig
Source§fn default() -> TextDetectionConfig
fn default() -> TextDetectionConfig
Returns the “default value” for a type. Read more
Source§impl Message for TextDetectionConfig
impl Message for TextDetectionConfig
Source§impl PartialEq for TextDetectionConfig
impl PartialEq for TextDetectionConfig
Source§fn eq(&self, other: &TextDetectionConfig) -> bool
fn eq(&self, other: &TextDetectionConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TextDetectionConfig
Auto Trait Implementations§
impl Freeze for TextDetectionConfig
impl RefUnwindSafe for TextDetectionConfig
impl Send for TextDetectionConfig
impl Sync for TextDetectionConfig
impl Unpin for TextDetectionConfig
impl UnsafeUnpin for TextDetectionConfig
impl UnwindSafe for TextDetectionConfig
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