#[non_exhaustive]pub struct FormField {
pub field_name: Option<Layout>,
pub field_value: Option<Layout>,
pub name_detected_languages: Vec<DetectedLanguage>,
pub value_detected_languages: Vec<DetectedLanguage>,
pub value_type: String,
pub corrected_key_text: String,
pub corrected_value_text: String,
pub provenance: Option<Provenance>,
/* private fields */
}Expand description
A form field detected on the page.
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.field_name: Option<Layout>§field_value: Option<Layout>§name_detected_languages: Vec<DetectedLanguage>A list of detected languages for name together with confidence.
value_detected_languages: Vec<DetectedLanguage>A list of detected languages for value together with confidence.
value_type: StringIf the value is non-textual, this field represents the type. Current valid values are:
- blank (this indicates the
field_valueis normal text) unfilled_checkboxfilled_checkbox
corrected_key_text: StringCreated for Labeling UI to export key text.
If corrections were made to the text identified by the
field_name.text_anchor, this field will contain the correction.
corrected_value_text: StringCreated for Labeling UI to export value text.
If corrections were made to the text identified by the
field_value.text_anchor, this field will contain the correction.
provenance: Option<Provenance>The history of this annotation.
Implementations§
Source§impl FormField
impl FormField
Sourcepub fn set_field_name<T>(self, v: T) -> Self
pub fn set_field_name<T>(self, v: T) -> Self
Sets the value of field_name.
§Example
use google_cloud_documentai_v1::model::document::page::Layout;
let x = FormField::new().set_field_name(Layout::default()/* use setters */);Sourcepub fn set_or_clear_field_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_field_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of field_name.
§Example
use google_cloud_documentai_v1::model::document::page::Layout;
let x = FormField::new().set_or_clear_field_name(Some(Layout::default()/* use setters */));
let x = FormField::new().set_or_clear_field_name(None::<Layout>);Sourcepub fn set_field_value<T>(self, v: T) -> Self
pub fn set_field_value<T>(self, v: T) -> Self
Sets the value of field_value.
§Example
use google_cloud_documentai_v1::model::document::page::Layout;
let x = FormField::new().set_field_value(Layout::default()/* use setters */);Sourcepub fn set_or_clear_field_value<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_field_value<T>(self, v: Option<T>) -> Self
Sets or clears the value of field_value.
§Example
use google_cloud_documentai_v1::model::document::page::Layout;
let x = FormField::new().set_or_clear_field_value(Some(Layout::default()/* use setters */));
let x = FormField::new().set_or_clear_field_value(None::<Layout>);Sourcepub fn set_name_detected_languages<T, V>(self, v: T) -> Self
pub fn set_name_detected_languages<T, V>(self, v: T) -> Self
Sets the value of name_detected_languages.
§Example
use google_cloud_documentai_v1::model::document::page::DetectedLanguage;
let x = FormField::new()
.set_name_detected_languages([
DetectedLanguage::default()/* use setters */,
DetectedLanguage::default()/* use (different) setters */,
]);Sourcepub fn set_value_detected_languages<T, V>(self, v: T) -> Self
pub fn set_value_detected_languages<T, V>(self, v: T) -> Self
Sets the value of value_detected_languages.
§Example
use google_cloud_documentai_v1::model::document::page::DetectedLanguage;
let x = FormField::new()
.set_value_detected_languages([
DetectedLanguage::default()/* use setters */,
DetectedLanguage::default()/* use (different) setters */,
]);Sourcepub fn set_value_type<T: Into<String>>(self, v: T) -> Self
pub fn set_value_type<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_corrected_key_text<T: Into<String>>(self, v: T) -> Self
pub fn set_corrected_key_text<T: Into<String>>(self, v: T) -> Self
Sets the value of corrected_key_text.
§Example
let x = FormField::new().set_corrected_key_text("example");Sourcepub fn set_corrected_value_text<T: Into<String>>(self, v: T) -> Self
pub fn set_corrected_value_text<T: Into<String>>(self, v: T) -> Self
Sets the value of corrected_value_text.
§Example
let x = FormField::new().set_corrected_value_text("example");Sourcepub fn set_provenance<T>(self, v: T) -> Selfwhere
T: Into<Provenance>,
pub fn set_provenance<T>(self, v: T) -> Selfwhere
T: Into<Provenance>,
Sets the value of provenance.
§Example
use google_cloud_documentai_v1::model::document::Provenance;
let x = FormField::new().set_provenance(Provenance::default()/* use setters */);Sourcepub fn set_or_clear_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<Provenance>,
pub fn set_or_clear_provenance<T>(self, v: Option<T>) -> Selfwhere
T: Into<Provenance>,
Sets or clears the value of provenance.
§Example
use google_cloud_documentai_v1::model::document::Provenance;
let x = FormField::new().set_or_clear_provenance(Some(Provenance::default()/* use setters */));
let x = FormField::new().set_or_clear_provenance(None::<Provenance>);Trait Implementations§
impl StructuralPartialEq for FormField
Auto Trait Implementations§
impl Freeze for FormField
impl RefUnwindSafe for FormField
impl Send for FormField
impl Sync for FormField
impl Unpin for FormField
impl UnsafeUnpin for FormField
impl UnwindSafe for FormField
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request