#[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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ImageChunkField
impl Debug for ImageChunkField
Source§impl Default for ImageChunkField
impl Default for ImageChunkField
Source§fn default() -> ImageChunkField
fn default() -> ImageChunkField
Source§impl Message for ImageChunkField
impl Message for ImageChunkField
Source§impl PartialEq for ImageChunkField
impl PartialEq for ImageChunkField
impl StructuralPartialEq for ImageChunkField
Auto Trait Implementations§
impl Freeze for ImageChunkField
impl RefUnwindSafe for ImageChunkField
impl Send for ImageChunkField
impl Sync for ImageChunkField
impl Unpin for ImageChunkField
impl UnsafeUnpin for ImageChunkField
impl UnwindSafe for ImageChunkField
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