pub enum MessageType {
Channel,
Stream,
Direct,
Private,
}Expand description
Represents a Zulip message type.
Variants§
Channel
Represents a channel messsage.
Stream
Represents a stream message.
Direct
Represents a direct message.
Private
(Deprecated) Alias for a Direct message.
Implementations§
Source§impl MessageType
impl MessageType
Sourcepub const CHANNEL: &str = "channel"
pub const CHANNEL: &str = "channel"
Represents the string value of the channel MessageType.
Sourcepub const STREAM: &str = "stream"
pub const STREAM: &str = "stream"
Represents the string value of the stream MessageType.
Sourcepub const DIRECT: &str = "direct"
pub const DIRECT: &str = "direct"
Represents the string value of the direct MessageType.
Sourcepub const PRIVATE: &str = "private"
pub const PRIVATE: &str = "private"
Represents the string value of the private MessageType.
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new MessageType.
Sourcepub const fn as_str(&self) -> &'static str
pub const fn as_str(&self) -> &'static str
Gets the string representation of the MessageType.
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 MessageType.
Trait Implementations§
Source§impl Clone for MessageType
impl Clone for MessageType
impl Copy for MessageType
Source§impl Debug for MessageType
impl Debug for MessageType
Source§impl Default for MessageType
impl Default for MessageType
Source§impl<'de> Deserialize<'de> for MessageType
impl<'de> Deserialize<'de> for MessageType
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 MessageType
impl Display for MessageType
impl Eq for MessageType
Source§impl PartialEq for MessageType
impl PartialEq for MessageType
Source§impl Serialize for MessageType
impl Serialize for MessageType
impl StructuralPartialEq for MessageType
Auto Trait Implementations§
impl Freeze for MessageType
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnsafeUnpin for MessageType
impl UnwindSafe for MessageType
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.