pub enum FileContents {
Text {
content: TextContent,
metadata: TextMetadata,
},
Binary {
message: String,
metadata: BinaryMetadata,
},
Image {
message: String,
metadata: ImageMetadata,
},
}Expand description
Represents the contents of a file with type-specific information.
This enum has different variants based on the detected file type:
Textfor text files with content and metadataBinaryfor binary files with a description message and metadataImagefor image files with a description message and metadata
Variants§
Text
Text file contents with the actual content and metadata
Fields
§
content: TextContentThe actual text content of the file
§
metadata: TextMetadataMetadata about the text content
Binary
Binary file representation with a descriptive message
Fields
§
metadata: BinaryMetadataMetadata about the binary file
Image
Image file representation with a descriptive message
Fields
§
metadata: ImageMetadataMetadata about the image file
Trait Implementations§
Source§impl Clone for FileContents
impl Clone for FileContents
Source§fn clone(&self) -> FileContents
fn clone(&self) -> FileContents
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileContents
impl Debug for FileContents
Source§impl<'de> Deserialize<'de> for FileContents
impl<'de> Deserialize<'de> for FileContents
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 FileContents
impl RefUnwindSafe for FileContents
impl Send for FileContents
impl Sync for FileContents
impl Unpin for FileContents
impl UnwindSafe for FileContents
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