Struct google_api_proto::google::cloud::documentai::v1beta2::document::page_anchor::PageRef
source · pub struct PageRef {
pub page: i64,
pub layout_type: i32,
pub layout_id: String,
pub bounding_poly: Option<BoundingPoly>,
pub confidence: f32,
}
Expand description
Represents a weak reference to a page element within a document.
Fields§
§page: i64
Required. Index into the
[Document.pages][google.cloud.documentai.v1beta2.Document.pages]
element, for example using
[Document.pages][page_refs.page]
to locate the related page element.
This field is skipped when its value is the default 0
. See
https://developers.google.com/protocol-buffers/docs/proto3#json.
layout_type: i32
Optional. The type of the layout element that is being referenced if any.
layout_id: String
Optional. Deprecated. Use [PageRef.bounding_poly][google.cloud.documentai.v1beta2.Document.PageAnchor.PageRef.bounding_poly] instead.
bounding_poly: Option<BoundingPoly>
Optional. Identifies the bounding polygon of a layout element on the
page. If layout_type
is set, the bounding polygon must be exactly the
same to the layout element it’s referring to.
confidence: f32
Optional. Confidence of detected page element, if applicable. Range
\[0, 1\]
.
Implementations§
source§impl PageRef
impl PageRef
sourcepub fn layout_type(&self) -> LayoutType
pub fn layout_type(&self) -> LayoutType
Returns the enum value of layout_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_layout_type(&mut self, value: LayoutType)
pub fn set_layout_type(&mut self, value: LayoutType)
Sets layout_type
to the provided enum value.
Trait Implementations§
source§impl Message for PageRef
impl Message for PageRef
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
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,
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,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self
.source§impl PartialEq for PageRef
impl PartialEq for PageRef
impl StructuralPartialEq for PageRef
Auto Trait Implementations§
impl Freeze for PageRef
impl RefUnwindSafe for PageRef
impl Send for PageRef
impl Sync for PageRef
impl Unpin for PageRef
impl UnwindSafe for PageRef
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<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