pub enum DocumentKind {
Markdown,
Pdf,
Text,
Other(String),
}Expand description
What a document is, as far as the read can tell - by extension, not by sniffing the bytes.
Other is kept as itself rather than bucketed: a viewer draws the kind
it was handed, and folding every unknown into one variant would leave it
with nothing to say about what the document is. The Files reader’s wider
UTF-8 drawing classification is the client’s policy, not this kind.
Variants§
Markdown
Text
Other(String)
An extension the list does not know, lowercased and bare ("rs"),
or empty when the name carries none.
Trait Implementations§
Source§impl Clone for DocumentKind
impl Clone for DocumentKind
Source§impl Debug for DocumentKind
impl Debug for DocumentKind
Source§impl<'de> Deserialize<'de> for DocumentKind
impl<'de> Deserialize<'de> for DocumentKind
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
impl Eq for DocumentKind
Source§impl PartialEq for DocumentKind
impl PartialEq for DocumentKind
Source§impl Serialize for DocumentKind
impl Serialize for DocumentKind
impl StructuralPartialEq for DocumentKind
Auto Trait Implementations§
impl Freeze for DocumentKind
impl RefUnwindSafe for DocumentKind
impl Send for DocumentKind
impl Sync for DocumentKind
impl Unpin for DocumentKind
impl UnsafeUnpin for DocumentKind
impl UnwindSafe for DocumentKind
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
Checks if this value is equivalent to the given key. Read more
§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.