pub enum Message {
Sent {
to: String,
media_type: MediaType,
created_at: DateTime<Utc>,
text: Option<String>,
},
Recieved {
from: String,
media_type: MediaType,
created_at: DateTime<Utc>,
text: Option<String>,
},
}Expand description
Enum for message types
Variants§
Implementations§
Source§impl Message
impl Message
Sourcepub fn media_type(&self) -> MediaType
pub fn media_type(&self) -> MediaType
Getter for message media type
Sourcepub fn created_at(&self) -> DateTime<Utc>
pub fn created_at(&self) -> DateTime<Utc>
Getter for message timestamp
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Message
impl<'de> Deserialize<'de> for Message
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 StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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