Struct google_api_proto::google::cloud::documentai::v1::Document
source · pub struct Document {Show 13 fields
pub mime_type: String,
pub text: String,
pub text_styles: Vec<Style>,
pub pages: Vec<Page>,
pub entities: Vec<Entity>,
pub entity_relations: Vec<EntityRelation>,
pub text_changes: Vec<TextChange>,
pub shard_info: Option<ShardInfo>,
pub error: Option<Status>,
pub revisions: Vec<Revision>,
pub document_layout: Option<DocumentLayout>,
pub chunked_document: Option<ChunkedDocument>,
pub source: Option<Source>,
}
Expand description
Document represents the canonical document resource in Document AI. It is an interchange format that provides insights into documents and allows for collaboration between users and Document AI to iterate and optimize for quality.
Fields§
§mime_type: String
An IANA published media type (MIME type).
text: String
Optional. UTF-8 encoded text in reading order from the document.
text_styles: Vec<Style>
Styles for the [Document.text][google.cloud.documentai.v1.Document.text].
pages: Vec<Page>
Visual page layout for the [Document][google.cloud.documentai.v1.Document].
entities: Vec<Entity>
A list of entities detected on [Document.text][google.cloud.documentai.v1.Document.text]. For document shards, entities in this list may cross shard boundaries.
entity_relations: Vec<EntityRelation>
Placeholder. Relationship among [Document.entities][google.cloud.documentai.v1.Document.entities].
text_changes: Vec<TextChange>
Placeholder. A list of text corrections made to [Document.text][google.cloud.documentai.v1.Document.text]. This is usually used for annotating corrections to OCR mistakes. Text changes for a given revision may not overlap with each other.
shard_info: Option<ShardInfo>
Information about the sharding if this document is sharded part of a larger document. If the document is not sharded, this message is not specified.
error: Option<Status>
Any error that occurred while processing this document.
revisions: Vec<Revision>
Placeholder. Revision history of this document.
document_layout: Option<DocumentLayout>
Parsed layout of the document.
chunked_document: Option<ChunkedDocument>
Document chunked based on chunking config.
source: Option<Source>
Original source document from the user.
Trait Implementations§
source§impl Message for Document
impl Message for Document
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 Document
impl PartialEq for Document
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl !Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnwindSafe for Document
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