#[non_exhaustive]pub struct ChunkField {
pub field_type: Option<FieldType>,
/* private fields */
}Expand description
The chunk field in the chunk. A chunk field could be one of the various types (for example, image, table) supported.
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.field_type: Option<FieldType>The type of the chunk field.
Implementations§
Source§impl ChunkField
impl ChunkField
Sourcepub fn set_field_type<T: Into<Option<FieldType>>>(self, v: T) -> Self
pub fn set_field_type<T: Into<Option<FieldType>>>(self, v: T) -> Self
Sets the value of field_type.
Note that all the setters affecting field_type are mutually
exclusive.
§Example
ⓘ
use google_cloud_documentai_v1::model::document::chunked_document::chunk::ImageChunkField;
let x = ChunkField::new().set_field_type(Some(
google_cloud_documentai_v1::model::document::chunked_document::chunk::chunk_field::FieldType::ImageChunkField(ImageChunkField::default().into())));Sourcepub fn image_chunk_field(&self) -> Option<&Box<ImageChunkField>>
pub fn image_chunk_field(&self) -> Option<&Box<ImageChunkField>>
The value of field_type
if it holds a ImageChunkField, None if the field is not set or
holds a different branch.
Sourcepub fn set_image_chunk_field<T: Into<Box<ImageChunkField>>>(self, v: T) -> Self
pub fn set_image_chunk_field<T: Into<Box<ImageChunkField>>>(self, v: T) -> Self
Sets the value of field_type
to hold a ImageChunkField.
Note that all the setters affecting field_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_documentai_v1::model::document::chunked_document::chunk::ImageChunkField;
let x = ChunkField::new().set_image_chunk_field(ImageChunkField::default()/* use setters */);
assert!(x.image_chunk_field().is_some());
assert!(x.table_chunk_field().is_none());Sourcepub fn table_chunk_field(&self) -> Option<&Box<TableChunkField>>
pub fn table_chunk_field(&self) -> Option<&Box<TableChunkField>>
The value of field_type
if it holds a TableChunkField, None if the field is not set or
holds a different branch.
Sourcepub fn set_table_chunk_field<T: Into<Box<TableChunkField>>>(self, v: T) -> Self
pub fn set_table_chunk_field<T: Into<Box<TableChunkField>>>(self, v: T) -> Self
Sets the value of field_type
to hold a TableChunkField.
Note that all the setters affecting field_type are
mutually exclusive.
§Example
ⓘ
use google_cloud_documentai_v1::model::document::chunked_document::chunk::TableChunkField;
let x = ChunkField::new().set_table_chunk_field(TableChunkField::default()/* use setters */);
assert!(x.table_chunk_field().is_some());
assert!(x.image_chunk_field().is_none());Trait Implementations§
Source§impl Clone for ChunkField
impl Clone for ChunkField
Source§fn clone(&self) -> ChunkField
fn clone(&self) -> ChunkField
Returns a duplicate of the value. Read more
1.0.0 · 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 ChunkField
impl Debug for ChunkField
Source§impl Default for ChunkField
impl Default for ChunkField
Source§fn default() -> ChunkField
fn default() -> ChunkField
Returns the “default value” for a type. Read more
Source§impl PartialEq for ChunkField
impl PartialEq for ChunkField
impl StructuralPartialEq for ChunkField
Auto Trait Implementations§
impl Freeze for ChunkField
impl RefUnwindSafe for ChunkField
impl Send for ChunkField
impl Sync for ChunkField
impl Unpin for ChunkField
impl UnsafeUnpin for ChunkField
impl UnwindSafe for ChunkField
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