#[non_exhaustive]pub struct ImageContext {
pub lat_long_rect: Option<LatLongRect>,
pub language_hints: Vec<String>,
pub crop_hints_params: Option<CropHintsParams>,
pub product_search_params: Option<ProductSearchParams>,
pub web_detection_params: Option<WebDetectionParams>,
pub text_detection_params: Option<TextDetectionParams>,
/* private fields */
}Expand description
Image context and/or feature-specific parameters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lat_long_rect: Option<LatLongRect>Not used.
language_hints: Vec<String>List of languages to use for TEXT_DETECTION. In most cases, an empty value
yields the best results since it enables automatic language detection. For
languages based on the Latin alphabet, setting language_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). Text detection returns an
error if one or more of the specified languages is not one of the
supported languages.
crop_hints_params: Option<CropHintsParams>Parameters for crop hints annotation request.
product_search_params: Option<ProductSearchParams>Parameters for product search.
web_detection_params: Option<WebDetectionParams>Parameters for web detection.
text_detection_params: Option<TextDetectionParams>Parameters for text detection and document text detection.
Implementations§
Source§impl ImageContext
impl ImageContext
pub fn new() -> Self
Sourcepub fn set_lat_long_rect<T>(self, v: T) -> Selfwhere
T: Into<LatLongRect>,
pub fn set_lat_long_rect<T>(self, v: T) -> Selfwhere
T: Into<LatLongRect>,
Sets the value of lat_long_rect.
Sourcepub fn set_or_clear_lat_long_rect<T>(self, v: Option<T>) -> Selfwhere
T: Into<LatLongRect>,
pub fn set_or_clear_lat_long_rect<T>(self, v: Option<T>) -> Selfwhere
T: Into<LatLongRect>,
Sets or clears the value of lat_long_rect.
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.
Sourcepub fn set_crop_hints_params<T>(self, v: T) -> Selfwhere
T: Into<CropHintsParams>,
pub fn set_crop_hints_params<T>(self, v: T) -> Selfwhere
T: Into<CropHintsParams>,
Sets the value of crop_hints_params.
Sourcepub fn set_or_clear_crop_hints_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<CropHintsParams>,
pub fn set_or_clear_crop_hints_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<CropHintsParams>,
Sets or clears the value of crop_hints_params.
Sourcepub fn set_product_search_params<T>(self, v: T) -> Selfwhere
T: Into<ProductSearchParams>,
pub fn set_product_search_params<T>(self, v: T) -> Selfwhere
T: Into<ProductSearchParams>,
Sets the value of product_search_params.
Sourcepub fn set_or_clear_product_search_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<ProductSearchParams>,
pub fn set_or_clear_product_search_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<ProductSearchParams>,
Sets or clears the value of product_search_params.
Sourcepub fn set_web_detection_params<T>(self, v: T) -> Selfwhere
T: Into<WebDetectionParams>,
pub fn set_web_detection_params<T>(self, v: T) -> Selfwhere
T: Into<WebDetectionParams>,
Sets the value of web_detection_params.
Sourcepub fn set_or_clear_web_detection_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<WebDetectionParams>,
pub fn set_or_clear_web_detection_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<WebDetectionParams>,
Sets or clears the value of web_detection_params.
Sourcepub fn set_text_detection_params<T>(self, v: T) -> Selfwhere
T: Into<TextDetectionParams>,
pub fn set_text_detection_params<T>(self, v: T) -> Selfwhere
T: Into<TextDetectionParams>,
Sets the value of text_detection_params.
Sourcepub fn set_or_clear_text_detection_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<TextDetectionParams>,
pub fn set_or_clear_text_detection_params<T>(self, v: Option<T>) -> Selfwhere
T: Into<TextDetectionParams>,
Sets or clears the value of text_detection_params.
Trait Implementations§
Source§impl Clone for ImageContext
impl Clone for ImageContext
Source§fn clone(&self) -> ImageContext
fn clone(&self) -> ImageContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more