pub struct Submessage { /* private fields */ }Expand description
Represents a message returned by the Zulip API server.
Implementations§
Source§impl Submessage
impl Submessage
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new Submessage.
Source§impl Submessage
impl Submessage
Sourcepub const fn msg_type(&self) -> MessageType
pub const fn msg_type(&self) -> MessageType
Gets the Submessage msg_type.
Sourcepub fn set_msg_type(&mut self, val: MessageType)
pub fn set_msg_type(&mut self, val: MessageType)
Sets the Submessage 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 Submessage msg_type.
Sourcepub const fn message_id(&self) -> u64
pub const fn message_id(&self) -> u64
Gets the Submessage message_id.
Sourcepub fn set_message_id(&mut self, val: u64)
pub fn set_message_id(&mut self, val: u64)
Sets the Submessage message_id.
Sourcepub fn with_message_id(self, val: u64) -> Self
pub fn with_message_id(self, val: u64) -> Self
Builder function that sets the Submessage message_id.
Sourcepub const fn sender_id(&self) -> u64
pub const fn sender_id(&self) -> u64
Gets the Submessage sender_id.
Sourcepub fn set_sender_id(&mut self, val: u64)
pub fn set_sender_id(&mut self, val: u64)
Sets the Submessage 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 Submessage sender_id.
Sourcepub const fn id(&self) -> u64
pub const fn id(&self) -> u64
Gets the Submessage id.
Sourcepub fn set_id(&mut self, val: u64)
pub fn set_id(&mut self, val: u64)
Sets the Submessage id.
Sourcepub fn with_id(self, val: u64) -> Self
pub fn with_id(self, val: u64) -> Self
Builder function that sets the Submessage id.
Source§impl Submessage
impl Submessage
Sourcepub fn content(&self) -> &str
pub fn content(&self) -> &str
Gets the Submessage content.
Sourcepub fn set_content<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_content<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the Submessage content.
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 Submessage content.
Trait Implementations§
Source§impl Clone for Submessage
impl Clone for Submessage
Source§impl Debug for Submessage
impl Debug for Submessage
Source§impl Default for Submessage
impl Default for Submessage
Source§impl<'de> Deserialize<'de> for Submessage
impl<'de> Deserialize<'de> for Submessage
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 Submessage
impl Display for Submessage
impl Eq for Submessage
Source§impl PartialEq for Submessage
impl PartialEq for Submessage
Source§impl Serialize for Submessage
impl Serialize for Submessage
impl StructuralPartialEq for Submessage
Auto Trait Implementations§
impl Freeze for Submessage
impl RefUnwindSafe for Submessage
impl Send for Submessage
impl Sync for Submessage
impl Unpin for Submessage
impl UnsafeUnpin for Submessage
impl UnwindSafe for Submessage
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.