pub enum DocumentMediaType {
PDF,
TXT,
RTF,
HTML,
CSS,
MARKDOWN,
CSV,
XML,
Javascript,
Python,
}Expand description
Describes the document media type of the content. Not every provider supports every media type. Includes also programming languages as document types for providers who support code running. Convertible to and from MIME type strings.
Variants§
Trait Implementations§
Source§impl Clone for DocumentMediaType
impl Clone for DocumentMediaType
Source§fn clone(&self) -> DocumentMediaType
fn clone(&self) -> DocumentMediaType
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 DocumentMediaType
impl Debug for DocumentMediaType
Source§impl<'de> Deserialize<'de> for DocumentMediaType
impl<'de> Deserialize<'de> for DocumentMediaType
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DocumentMediaType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DocumentMediaType, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl MimeType for DocumentMediaType
impl MimeType for DocumentMediaType
fn from_mime_type(mime_type: &str) -> Option<DocumentMediaType>
fn to_mime_type(&self) -> &'static str
Source§impl PartialEq for DocumentMediaType
impl PartialEq for DocumentMediaType
Source§impl Serialize for DocumentMediaType
impl Serialize for DocumentMediaType
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<DocumentMediaType> for DocumentFormat
impl TryFrom<DocumentMediaType> for DocumentFormat
Source§type Error = MessageError
type Error = MessageError
The type returned in the event of a conversion error.
Source§fn try_from(
value: DocumentMediaType,
) -> Result<DocumentFormat, <DocumentFormat as TryFrom<DocumentMediaType>>::Error>
fn try_from( value: DocumentMediaType, ) -> Result<DocumentFormat, <DocumentFormat as TryFrom<DocumentMediaType>>::Error>
Performs the conversion.
impl StructuralPartialEq for DocumentMediaType
Auto Trait Implementations§
impl Freeze for DocumentMediaType
impl RefUnwindSafe for DocumentMediaType
impl Send for DocumentMediaType
impl Sync for DocumentMediaType
impl Unpin for DocumentMediaType
impl UnwindSafe for DocumentMediaType
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