pub struct FilePreview {
pub metadata: FileMetadata,
pub content: Vec<u8>,
pub truncated: bool,
}Expand description
Bounded file preview.
Fields§
§metadata: FileMetadataFile metadata.
content: Vec<u8>Retained content prefix.
truncated: boolWhether the file exceeded the preview limit.
Trait Implementations§
Source§impl Clone for FilePreview
impl Clone for FilePreview
Source§fn clone(&self) -> FilePreview
fn clone(&self) -> FilePreview
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FilePreview
impl Debug for FilePreview
Source§impl<'de> Deserialize<'de> for FilePreview
impl<'de> Deserialize<'de> for FilePreview
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
Source§impl PartialEq for FilePreview
impl PartialEq for FilePreview
Source§fn eq(&self, other: &FilePreview) -> bool
fn eq(&self, other: &FilePreview) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FilePreview
impl Serialize for FilePreview
impl Eq for FilePreview
impl StructuralPartialEq for FilePreview
Auto Trait Implementations§
impl Freeze for FilePreview
impl RefUnwindSafe for FilePreview
impl Send for FilePreview
impl Sync for FilePreview
impl Unpin for FilePreview
impl UnsafeUnpin for FilePreview
impl UnwindSafe for FilePreview
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.