Enum google_api_proto::google::cloud::automl::v1::document::layout::TextSegmentType
source · #[repr(i32)]pub enum TextSegmentType {
Unspecified = 0,
Token = 1,
Paragraph = 2,
FormField = 3,
FormFieldName = 4,
FormFieldContents = 5,
Table = 6,
TableHeader = 7,
TableRow = 8,
TableCell = 9,
}
Expand description
The type of TextSegment in the context of the original document.
Variants§
Unspecified = 0
Should not be used.
Token = 1
The text segment is a token. e.g. word.
Paragraph = 2
The text segment is a paragraph.
FormField = 3
The text segment is a form field.
FormFieldName = 4
The text segment is the name part of a form field. It will be treated as child of another FORM_FIELD TextSegment if its span is subspan of another TextSegment with type FORM_FIELD.
FormFieldContents = 5
The text segment is the text content part of a form field. It will be treated as child of another FORM_FIELD TextSegment if its span is subspan of another TextSegment with type FORM_FIELD.
Table = 6
The text segment is a whole table, including headers, and all rows.
TableHeader = 7
The text segment is a table’s headers. It will be treated as child of another TABLE TextSegment if its span is subspan of another TextSegment with type TABLE.
TableRow = 8
The text segment is a row in table. It will be treated as child of another TABLE TextSegment if its span is subspan of another TextSegment with type TABLE.
TableCell = 9
The text segment is a cell in table. It will be treated as child of another TABLE_ROW TextSegment if its span is subspan of another TextSegment with type TABLE_ROW.
Implementations§
source§impl TextSegmentType
impl TextSegmentType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for TextSegmentType
impl Clone for TextSegmentType
source§fn clone(&self) -> TextSegmentType
fn clone(&self) -> TextSegmentType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TextSegmentType
impl Debug for TextSegmentType
source§impl Default for TextSegmentType
impl Default for TextSegmentType
source§fn default() -> TextSegmentType
fn default() -> TextSegmentType
source§impl From<TextSegmentType> for i32
impl From<TextSegmentType> for i32
source§fn from(value: TextSegmentType) -> i32
fn from(value: TextSegmentType) -> i32
source§impl Hash for TextSegmentType
impl Hash for TextSegmentType
source§impl Ord for TextSegmentType
impl Ord for TextSegmentType
source§fn cmp(&self, other: &TextSegmentType) -> Ordering
fn cmp(&self, other: &TextSegmentType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for TextSegmentType
impl PartialEq for TextSegmentType
source§fn eq(&self, other: &TextSegmentType) -> bool
fn eq(&self, other: &TextSegmentType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TextSegmentType
impl PartialOrd for TextSegmentType
source§fn partial_cmp(&self, other: &TextSegmentType) -> Option<Ordering>
fn partial_cmp(&self, other: &TextSegmentType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for TextSegmentType
impl TryFrom<i32> for TextSegmentType
§type Error = DecodeError
type Error = DecodeError
source§fn try_from(value: i32) -> Result<TextSegmentType, DecodeError>
fn try_from(value: i32) -> Result<TextSegmentType, DecodeError>
impl Copy for TextSegmentType
impl Eq for TextSegmentType
impl StructuralPartialEq for TextSegmentType
Auto Trait Implementations§
impl Freeze for TextSegmentType
impl RefUnwindSafe for TextSegmentType
impl Send for TextSegmentType
impl Sync for TextSegmentType
impl Unpin for TextSegmentType
impl UnwindSafe for TextSegmentType
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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