pub struct Document {
pub id: DocumentId,
pub original_file_name: String,
pub page_count: u32,
/* private fields */
}Expand description
Represents a document
Fields§
§id: DocumentIdUnique identifier of the document.
original_file_name: StringOriginal file name of the document.
page_count: u32Number of pages in the document.
Implementations§
Source§impl Document
impl Document
Get all tag-ids for the document.
Sourcepub fn set_content(&mut self, content: &str)
pub fn set_content(&mut self, content: &str)
Set the content of the document.
Sourcepub fn custom_fields(&self) -> &[DocumentCustomField]
pub fn custom_fields(&self) -> &[DocumentCustomField]
Get all custom fields for the document.
Sourcepub fn set_custom_field(&mut self, field: CustomFieldId, value: &str)
pub fn set_custom_field(&mut self, field: CustomFieldId, value: &str)
Set a custom field for the document.
Sourcepub async fn get_full_content(&mut self) -> Result<(), Error>
pub async fn get_full_content(&mut self) -> Result<(), Error>
Get the full content of the document, replacing any truncated content.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Document
impl<'de> Deserialize<'de> for Document
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Document
impl !RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin 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
Mutably borrows from an owned value. Read more