pub enum ContentType {
Html,
Markdown,
}Expand description
Represents the content type of a Zulip message.
Variants§
Implementations§
Source§impl ContentType
impl ContentType
Sourcepub const HTML: &str = "text/html"
pub const HTML: &str = "text/html"
Represents the string value of the HTML ContentType.
Sourcepub const MARKDOWN: &str = "text/x-markdown"
pub const MARKDOWN: &str = "text/x-markdown"
Represents the string value of the Markdown ContentType.
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new ContentType.
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Gets the ContentType string representation.
Sourcepub fn try_from_str(val: &str) -> Result<Self>
pub fn try_from_str(val: &str) -> Result<Self>
Attempts to convert a string into a ContentType.
Trait Implementations§
Source§impl Clone for ContentType
impl Clone for ContentType
impl Copy for ContentType
Source§impl Debug for ContentType
impl Debug for ContentType
Source§impl Default for ContentType
impl Default for ContentType
Source§impl<'de> Deserialize<'de> for ContentType
impl<'de> Deserialize<'de> for ContentType
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 Display for ContentType
impl Display for ContentType
impl Eq for ContentType
Source§impl From<ContentType> for &'static str
impl From<ContentType> for &'static str
Source§fn from(val: ContentType) -> Self
fn from(val: ContentType) -> Self
Converts to this type from the input type.
Source§impl From<ContentType> for String
impl From<ContentType> for String
Source§fn from(val: ContentType) -> Self
fn from(val: ContentType) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ContentType
impl PartialEq for ContentType
Source§impl Serialize for ContentType
impl Serialize for ContentType
impl StructuralPartialEq for ContentType
Source§impl TryFrom<&String> for ContentType
impl TryFrom<&String> for ContentType
Source§impl TryFrom<&str> for ContentType
impl TryFrom<&str> for ContentType
Auto Trait Implementations§
impl Freeze for ContentType
impl RefUnwindSafe for ContentType
impl Send for ContentType
impl Sync for ContentType
impl Unpin for ContentType
impl UnsafeUnpin for ContentType
impl UnwindSafe for ContentType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.