#[non_exhaustive]pub struct TextAnchor {
pub text_segments: Vec<TextSegment>,
pub content: String,
/* private fields */
}Expand description
Text reference indexing into the Document.text.
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.text_segments: Vec<TextSegment>The text segments from the Document.text.
content: StringContains the content of the text span so that users do not have to look it up in the text_segments. It is always populated for formFields.
Implementations§
Source§impl TextAnchor
impl TextAnchor
pub fn new() -> Self
Sourcepub fn set_text_segments<T, V>(self, v: T) -> Self
pub fn set_text_segments<T, V>(self, v: T) -> Self
Sets the value of text_segments.
§Example
ⓘ
use google_cloud_documentai_v1::model::document::text_anchor::TextSegment;
let x = TextAnchor::new()
.set_text_segments([
TextSegment::default()/* use setters */,
TextSegment::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for TextAnchor
impl Clone for TextAnchor
Source§fn clone(&self) -> TextAnchor
fn clone(&self) -> TextAnchor
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 TextAnchor
impl Debug for TextAnchor
Source§impl Default for TextAnchor
impl Default for TextAnchor
Source§fn default() -> TextAnchor
fn default() -> TextAnchor
Returns the “default value” for a type. Read more
Source§impl PartialEq for TextAnchor
impl PartialEq for TextAnchor
impl StructuralPartialEq for TextAnchor
Auto Trait Implementations§
impl Freeze for TextAnchor
impl RefUnwindSafe for TextAnchor
impl Send for TextAnchor
impl Sync for TextAnchor
impl Unpin for TextAnchor
impl UnwindSafe for TextAnchor
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