pub struct Message { /* private fields */ }Expand description
Represents a message returned by the Zulip API server.
Implementations§
Source§impl Message
impl Message
Sourcepub fn avatar_url(&self) -> Option<&str>
pub fn avatar_url(&self) -> Option<&str>
Gets the Message avatar_url.
Sourcepub fn set_avatar_url<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_avatar_url<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Message avatar_url.
Sourcepub fn unset_avatar_url(&mut self) -> Option<String>
pub fn unset_avatar_url(&mut self) -> Option<String>
Unsets the Message avatar_url.
Sourcepub fn with_avatar_url<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_avatar_url<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message avatar_url.
Sourcepub fn match_content(&self) -> Option<&str>
pub fn match_content(&self) -> Option<&str>
Gets the Message match_content.
Sourcepub fn set_match_content<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_match_content<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Message match_content.
Sourcepub fn unset_match_content(&mut self) -> Option<String>
pub fn unset_match_content(&mut self) -> Option<String>
Unsets the Message match_content.
Sourcepub fn with_match_content<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_match_content<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message match_content.
Sourcepub fn match_subject(&self) -> Option<&str>
pub fn match_subject(&self) -> Option<&str>
Gets the Message match_subject.
Sourcepub fn set_match_subject<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_match_subject<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Message match_subject.
Sourcepub fn unset_match_subject(&mut self) -> Option<String>
pub fn unset_match_subject(&mut self) -> Option<String>
Unsets the Message match_subject.
Sourcepub fn with_match_subject<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_match_subject<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message match_subject.
Sourcepub fn edit_history(&self) -> Option<&[EditHistory]>
pub fn edit_history(&self) -> Option<&[EditHistory]>
Gets the Message edit_history.
Sourcepub fn set_edit_history<'a, C: Into<Cow<'a, [EditHistory]>>>(&mut self, val: C)
pub fn set_edit_history<'a, C: Into<Cow<'a, [EditHistory]>>>(&mut self, val: C)
Sets the Message edit_history.
Sourcepub fn unset_edit_history(&mut self) -> Option<Vec<EditHistory>>
pub fn unset_edit_history(&mut self) -> Option<Vec<EditHistory>>
Unsets the Message edit_history.
Sourcepub fn with_edit_history<'a, C: Into<Cow<'a, [EditHistory]>>>(
self,
val: C,
) -> Self
pub fn with_edit_history<'a, C: Into<Cow<'a, [EditHistory]>>>( self, val: C, ) -> Self
Builder function that sets the Message edit_history.
Source§impl Message
impl Message
Sourcepub fn with_client<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_client<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message client.
Sourcepub fn with_content<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_content<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message content.
Sourcepub fn display_recipient(&self) -> &DisplayRecipient
pub fn display_recipient(&self) -> &DisplayRecipient
Gets the Message display_recipient.
Sourcepub fn set_display_recipient<'a, C: Into<Cow<'a, DisplayRecipient>>>(
&mut self,
val: C,
)
pub fn set_display_recipient<'a, C: Into<Cow<'a, DisplayRecipient>>>( &mut self, val: C, )
Sets the Message display_recipient.
Sourcepub fn with_display_recipient<'a, C: Into<Cow<'a, DisplayRecipient>>>(
self,
val: C,
) -> Self
pub fn with_display_recipient<'a, C: Into<Cow<'a, DisplayRecipient>>>( self, val: C, ) -> Self
Builder function that sets the Message display_recipient.
Source§impl Message
impl Message
Sourcepub const fn content_type(&self) -> ContentType
pub const fn content_type(&self) -> ContentType
Gets the Message content_type.
Sourcepub fn set_content_type(&mut self, val: ContentType)
pub fn set_content_type(&mut self, val: ContentType)
Sets the Message content_type.
Sourcepub fn with_content_type(self, val: ContentType) -> Self
pub fn with_content_type(self, val: ContentType) -> Self
Builder function that sets the Message content_type.
Sourcepub const fn is_me_message(&self) -> bool
pub const fn is_me_message(&self) -> bool
Gets the Message is_me_message.
Sourcepub fn set_is_me_message(&mut self, val: bool)
pub fn set_is_me_message(&mut self, val: bool)
Sets the Message is_me_message.
Sourcepub fn with_is_me_message(self, val: bool) -> Self
pub fn with_is_me_message(self, val: bool) -> Self
Builder function that sets the Message is_me_message.
Sourcepub const fn recipient_id(&self) -> u64
pub const fn recipient_id(&self) -> u64
Gets the Message recipient_id.
Sourcepub fn set_recipient_id(&mut self, val: u64)
pub fn set_recipient_id(&mut self, val: u64)
Sets the Message recipient_id.
Sourcepub fn with_recipient_id(self, val: u64) -> Self
pub fn with_recipient_id(self, val: u64) -> Self
Builder function that sets the Message recipient_id.
Sourcepub fn set_sender_id(&mut self, val: u64)
pub fn set_sender_id(&mut self, val: u64)
Sets the Message sender_id.
Sourcepub fn with_sender_id(self, val: u64) -> Self
pub fn with_sender_id(self, val: u64) -> Self
Builder function that sets the Message sender_id.
Sourcepub fn set_timestamp(&mut self, val: u64)
pub fn set_timestamp(&mut self, val: u64)
Sets the Message timestamp.
Sourcepub fn with_timestamp(self, val: u64) -> Self
pub fn with_timestamp(self, val: u64) -> Self
Builder function that sets the Message timestamp.
Sourcepub const fn msg_type(&self) -> MessageType
pub const fn msg_type(&self) -> MessageType
Gets the Message msg_type.
Sourcepub fn set_msg_type(&mut self, val: MessageType)
pub fn set_msg_type(&mut self, val: MessageType)
Sets the Message msg_type.
Sourcepub fn with_msg_type(self, val: MessageType) -> Self
pub fn with_msg_type(self, val: MessageType) -> Self
Builder function that sets the Message msg_type.
Source§impl Message
impl Message
Sourcepub const fn last_edit_timestamp(&self) -> Option<u64>
pub const fn last_edit_timestamp(&self) -> Option<u64>
Gets the Message last_edit_timestamp.
Sourcepub fn set_last_edit_timestamp(&mut self, val: u64)
pub fn set_last_edit_timestamp(&mut self, val: u64)
Sets the Message last_edit_timestamp.
Sourcepub fn unset_last_edit_timestamp(&mut self) -> Option<u64>
pub fn unset_last_edit_timestamp(&mut self) -> Option<u64>
Unsets the Message last_edit_timestamp.
Sourcepub fn with_last_edit_timestamp(self, val: u64) -> Self
pub fn with_last_edit_timestamp(self, val: u64) -> Self
Builder function that sets the Message last_edit_timestamp.
Sourcepub const fn last_moved_timestamp(&self) -> Option<u64>
pub const fn last_moved_timestamp(&self) -> Option<u64>
Gets the Message last_moved_timestamp.
Sourcepub fn set_last_moved_timestamp(&mut self, val: u64)
pub fn set_last_moved_timestamp(&mut self, val: u64)
Sets the Message last_moved_timestamp.
Sourcepub fn unset_last_moved_timestamp(&mut self) -> Option<u64>
pub fn unset_last_moved_timestamp(&mut self) -> Option<u64>
Unsets the Message last_moved_timestamp.
Sourcepub fn with_last_moved_timestamp(self, val: u64) -> Self
pub fn with_last_moved_timestamp(self, val: u64) -> Self
Builder function that sets the Message last_moved_timestamp.
Sourcepub fn set_stream_id(&mut self, val: u64)
pub fn set_stream_id(&mut self, val: u64)
Sets the Message stream_id.
Sourcepub fn unset_stream_id(&mut self) -> Option<u64>
pub fn unset_stream_id(&mut self) -> Option<u64>
Unsets the Message stream_id.
Sourcepub fn with_stream_id(self, val: u64) -> Self
pub fn with_stream_id(self, val: u64) -> Self
Builder function that sets the Message stream_id.
Source§impl Message
impl Message
Sourcepub fn set_reactions<'a, C: Into<Cow<'a, [Reaction]>>>(&mut self, val: C)
pub fn set_reactions<'a, C: Into<Cow<'a, [Reaction]>>>(&mut self, val: C)
Sets the Message reactions.
Sourcepub fn with_reactions<'a, C: Into<Cow<'a, [Reaction]>>>(self, val: C) -> Self
pub fn with_reactions<'a, C: Into<Cow<'a, [Reaction]>>>(self, val: C) -> Self
Builder function that sets the Message reactions.
Sourcepub fn sender_email(&self) -> &str
pub fn sender_email(&self) -> &str
Gets the Message sender_email.
Sourcepub fn set_sender_email<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_sender_email<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Message sender_email.
Sourcepub fn with_sender_email<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_sender_email<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message sender_email.
Sourcepub fn sender_full_name(&self) -> &str
pub fn sender_full_name(&self) -> &str
Gets the Message sender_full_name.
Sourcepub fn set_sender_full_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_sender_full_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Message sender_full_name.
Sourcepub fn with_sender_full_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_sender_full_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message sender_full_name.
Sourcepub fn sender_realm_str(&self) -> &str
pub fn sender_realm_str(&self) -> &str
Gets the Message sender_realm_str.
Sourcepub fn set_sender_realm_str<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_sender_realm_str<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Message sender_realm_str.
Sourcepub fn with_sender_realm_str<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_sender_realm_str<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message sender_realm_str.
Sourcepub fn with_subject<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_subject<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the Message subject.
Sourcepub fn submessages(&self) -> &[Submessage]
pub fn submessages(&self) -> &[Submessage]
Gets the Message submessages.
Sourcepub fn set_submessages<'a, C: Into<Cow<'a, [Submessage]>>>(&mut self, val: C)
pub fn set_submessages<'a, C: Into<Cow<'a, [Submessage]>>>(&mut self, val: C)
Sets the Message submessages.
Sourcepub fn with_submessages<'a, C: Into<Cow<'a, [Submessage]>>>(
self,
val: C,
) -> Self
pub fn with_submessages<'a, C: Into<Cow<'a, [Submessage]>>>( self, val: C, ) -> Self
Builder function that sets the Message submessages.
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>,
impl Eq for Message
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 UnsafeUnpin 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
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
key and return true if they are equal.