pub struct UnreadMsgsPm { /* private fields */ }Expand description
Represents details of unread one-on-one direct messages with a specific user.
Note that it is possible for a message that the current user sent to the specified user to be marked as unread and thus appear here.
Modified from openapi-generator-cli output:
$ openapi-generator-cli generate -g rust -i ./zerver/openapi/zulip.yaml -o zulip-openapi --skip-validate-spec/*
* Zulip REST API
*
* Powerful open source group chat
*
* The version of the OpenAPI document: 1.0.0
*
* Generated by: https://openapi-generator.tech
*/See zerver/openapi/zulip.yaml for the original OpenAPI configuration.
Configuration slightly modified to work with the Rust generator of openapi-generator-cli.
Implementations§
Source§impl UnreadMsgsPm
impl UnreadMsgsPm
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new UnreadMsgsPm.
Source§impl UnreadMsgsPm
impl UnreadMsgsPm
Sourcepub const fn other_user_id(&self) -> Option<u64>
pub const fn other_user_id(&self) -> Option<u64>
Gets the UnreadMsgsPm other_user_id.
The user ID of the other participant in this one-on-one direct message conversation.
Will be the current user’s ID for messages that they sent in a one-on-one direct message conversation with themself.
Changes: New in Zulip 5.0 (feature level 119), replacing the less clearly named sender_id field.
Sourcepub fn set_other_user_id(&mut self, val: u64)
pub fn set_other_user_id(&mut self, val: u64)
Sets the UnreadMsgsPm other_user_id.
The user ID of the other participant in this one-on-one direct message conversation.
Will be the current user’s ID for messages that they sent in a one-on-one direct message conversation with themself.
Changes: New in Zulip 5.0 (feature level 119), replacing the less clearly named sender_id field.
Sourcepub fn unset_other_user_id(&mut self) -> Option<u64>
pub fn unset_other_user_id(&mut self) -> Option<u64>
Unsets the UnreadMsgsPm other_user_id.
The user ID of the other participant in this one-on-one direct message conversation.
Will be the current user’s ID for messages that they sent in a one-on-one direct message conversation with themself.
Changes: New in Zulip 5.0 (feature level 119), replacing the less clearly named sender_id field.
Sourcepub fn with_other_user_id(self, val: u64) -> Self
pub fn with_other_user_id(self, val: u64) -> Self
Builder function that sets the UnreadMsgsPm other_user_id.
The user ID of the other participant in this one-on-one direct message conversation.
Will be the current user’s ID for messages that they sent in a one-on-one direct message conversation with themself.
Changes: New in Zulip 5.0 (feature level 119), replacing the less clearly named sender_id field.
Sourcepub const fn sender_id(&self) -> Option<u64>
pub const fn sender_id(&self) -> Option<u64>
Gets the UnreadMsgsPm sender_id.
Old name for the other_user_id field.
Clients should access this field in Zulip server versions that do not yet support other_user_id.
Changes: Deprecated in Zulip 5.0 (feature level 119). We expect to provide a next version of the full unread_msgs API before removing this legacy name.
Sourcepub fn set_sender_id(&mut self, val: u64)
pub fn set_sender_id(&mut self, val: u64)
Sets the UnreadMsgsPm sender_id.
Old name for the other_user_id field.
Clients should access this field in Zulip server versions that do not yet support other_user_id.
Changes: Deprecated in Zulip 5.0 (feature level 119). We expect to provide a next version of the full unread_msgs API before removing this legacy name.
Sourcepub fn unset_sender_id(&mut self) -> Option<u64>
pub fn unset_sender_id(&mut self) -> Option<u64>
Unsets the UnreadMsgsPm sender_id.
Old name for the other_user_id field.
Clients should access this field in Zulip server versions that do not yet support other_user_id.
Changes: Deprecated in Zulip 5.0 (feature level 119). We expect to provide a next version of the full unread_msgs API before removing this legacy name.
Sourcepub fn with_sender_id(self, val: u64) -> Self
pub fn with_sender_id(self, val: u64) -> Self
Builder function that sets the UnreadMsgsPm sender_id.
Old name for the other_user_id field.
Clients should access this field in Zulip server versions that do not yet support other_user_id.
Changes: Deprecated in Zulip 5.0 (feature level 119). We expect to provide a next version of the full unread_msgs API before removing this legacy name.
Source§impl UnreadMsgsPm
impl UnreadMsgsPm
Sourcepub fn unread_message_ids(&self) -> Option<&[u64]>
pub fn unread_message_ids(&self) -> Option<&[u64]>
Gets the UnreadMsgsPm unread_message_ids.
The message IDs of the recent unread direct messages sent by either user in this one-on-one direct message conversation, sorted in ascending order.
Sourcepub fn set_unread_message_ids<'a, C: Into<Cow<'a, [u64]>>>(&mut self, val: C)
pub fn set_unread_message_ids<'a, C: Into<Cow<'a, [u64]>>>(&mut self, val: C)
Sets the UnreadMsgsPm unread_message_ids.
The message IDs of the recent unread direct messages sent by either user in this one-on-one direct message conversation, sorted in ascending order.
Sourcepub fn unset_unread_message_ids(&mut self) -> Option<Vec<u64>>
pub fn unset_unread_message_ids(&mut self) -> Option<Vec<u64>>
Unsets the UnreadMsgsPm unread_message_ids.
The message IDs of the recent unread direct messages sent by either user in this one-on-one direct message conversation, sorted in ascending order.
Sourcepub fn with_unread_message_ids<'a, C: Into<Cow<'a, [u64]>>>(
self,
val: C,
) -> Self
pub fn with_unread_message_ids<'a, C: Into<Cow<'a, [u64]>>>( self, val: C, ) -> Self
Builder function that sets the UnreadMsgsPm unread_message_ids.
The message IDs of the recent unread direct messages sent by either user in this one-on-one direct message conversation, sorted in ascending order.