Struct google_api_proto::google::cloud::documentai::v1beta3::document::page::Layout
source · pub struct Layout {
pub text_anchor: Option<TextAnchor>,
pub confidence: f32,
pub bounding_poly: Option<BoundingPoly>,
pub orientation: i32,
}
Expand description
Visual element describing a layout unit on a page.
Fields§
§text_anchor: Option<TextAnchor>
Text anchor indexing into the [Document.text][google.cloud.documentai.v1beta3.Document.text].
confidence: f32
Confidence of the current
[Layout][google.cloud.documentai.v1beta3.Document.Page.Layout] within
context of the object this layout is for. e.g. confidence can be for a
single token, a table, a visual element, etc. depending on context.
Range \[0, 1\]
.
bounding_poly: Option<BoundingPoly>
The bounding polygon for the [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout].
orientation: i32
Detected orientation for the [Layout][google.cloud.documentai.v1beta3.Document.Page.Layout].
Implementations§
source§impl Layout
impl Layout
sourcepub fn orientation(&self) -> Orientation
pub fn orientation(&self) -> Orientation
Returns the enum value of orientation
, or the default if the field is set to an invalid enum value.
sourcepub fn set_orientation(&mut self, value: Orientation)
pub fn set_orientation(&mut self, value: Orientation)
Sets orientation
to the provided enum value.
Trait Implementations§
source§impl Message for Layout
impl Message for Layout
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message to a newly allocated buffer.
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
.source§impl PartialEq for Layout
impl PartialEq for Layout
impl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
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
§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>
Wrap the input message
T
in a tonic::Request