#[non_exhaustive]pub struct ImageChunkField {
pub annotations: Option<Annotations>,
pub image_source: Option<ImageSource>,
/* private fields */
}Expand description
The image chunk field in the chunk.
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.annotations: Option<Annotations>Annotation of the image chunk field.
image_source: Option<ImageSource>Source of the image.
Implementations§
Source§impl ImageChunkField
impl ImageChunkField
Sourcepub fn set_annotations<T>(self, v: T) -> Selfwhere
T: Into<Annotations>,
pub fn set_annotations<T>(self, v: T) -> Selfwhere
T: Into<Annotations>,
Sets the value of annotations.
§Example
use google_cloud_documentai_v1::model::document::Annotations;
let x = ImageChunkField::new().set_annotations(Annotations::default()/* use setters */);Sourcepub fn set_or_clear_annotations<T>(self, v: Option<T>) -> Selfwhere
T: Into<Annotations>,
pub fn set_or_clear_annotations<T>(self, v: Option<T>) -> Selfwhere
T: Into<Annotations>,
Sets or clears the value of annotations.
§Example
use google_cloud_documentai_v1::model::document::Annotations;
let x = ImageChunkField::new().set_or_clear_annotations(Some(Annotations::default()/* use setters */));
let x = ImageChunkField::new().set_or_clear_annotations(None::<Annotations>);Sourcepub fn set_image_source<T: Into<Option<ImageSource>>>(self, v: T) -> Self
pub fn set_image_source<T: Into<Option<ImageSource>>>(self, v: T) -> Self
Sets the value of image_source.
Note that all the setters affecting image_source are mutually
exclusive.
§Example
use google_cloud_documentai_v1::model::document::chunked_document::chunk::image_chunk_field::ImageSource;
let x = ImageChunkField::new().set_image_source(Some(ImageSource::BlobAssetId("example".to_string())));Sourcepub fn blob_asset_id(&self) -> Option<&String>
pub fn blob_asset_id(&self) -> Option<&String>
The value of image_source
if it holds a BlobAssetId, None if the field is not set or
holds a different branch.
Sourcepub fn set_blob_asset_id<T: Into<String>>(self, v: T) -> Self
pub fn set_blob_asset_id<T: Into<String>>(self, v: T) -> Self
Sets the value of image_source
to hold a BlobAssetId.
Note that all the setters affecting image_source are
mutually exclusive.
§Example
let x = ImageChunkField::new().set_blob_asset_id("example");
assert!(x.blob_asset_id().is_some());
assert!(x.gcs_uri().is_none());
assert!(x.data_uri().is_none());Sourcepub fn gcs_uri(&self) -> Option<&String>
pub fn gcs_uri(&self) -> Option<&String>
The value of image_source
if it holds a GcsUri, None if the field is not set or
holds a different branch.
Sourcepub fn set_gcs_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_gcs_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of image_source
to hold a GcsUri.
Note that all the setters affecting image_source are
mutually exclusive.
§Example
let x = ImageChunkField::new().set_gcs_uri("example");
assert!(x.gcs_uri().is_some());
assert!(x.blob_asset_id().is_none());
assert!(x.data_uri().is_none());Sourcepub fn data_uri(&self) -> Option<&String>
pub fn data_uri(&self) -> Option<&String>
The value of image_source
if it holds a DataUri, None if the field is not set or
holds a different branch.
Sourcepub fn set_data_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_data_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of image_source
to hold a DataUri.
Note that all the setters affecting image_source are
mutually exclusive.
§Example
let x = ImageChunkField::new().set_data_uri("example");
assert!(x.data_uri().is_some());
assert!(x.blob_asset_id().is_none());
assert!(x.gcs_uri().is_none());Trait Implementations§
Source§impl Clone for ImageChunkField
impl Clone for ImageChunkField
Source§fn clone(&self) -> ImageChunkField
fn clone(&self) -> ImageChunkField
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more