pub struct UnreadMsgs { /* private fields */ }Expand description
Represents a set of data structures describing the conversations containing the 50000 most recent unread messages the user has received.
This will usually contain every unread message the user has received, but clients should support users with even more unread messages (and not hardcode the number 50000).
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 UnreadMsgs
impl UnreadMsgs
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new UnreadMsgs.
Source§impl UnreadMsgs
impl UnreadMsgs
Sourcepub const fn count(&self) -> Option<u64>
pub const fn count(&self) -> Option<u64>
Gets the UnreadMsgs count.
The total number of unread messages to display.
This includes one-on-one and group direct messages, as well as channel messages that are not muted.
Changes: Before Zulip 8.0 (feature level 213), the unmute and follow topic features were not handled correctly in calculating this field.
Sourcepub fn set_count(&mut self, val: u64)
pub fn set_count(&mut self, val: u64)
Sets the UnreadMsgs count.
The total number of unread messages to display.
This includes one-on-one and group direct messages, as well as channel messages that are not muted.
Changes: Before Zulip 8.0 (feature level 213), the unmute and follow topic features were not handled correctly in calculating this field.
Sourcepub fn unset_count(&mut self) -> Option<u64>
pub fn unset_count(&mut self) -> Option<u64>
Unsets the UnreadMsgs count.
The total number of unread messages to display.
This includes one-on-one and group direct messages, as well as channel messages that are not muted.
Changes: Before Zulip 8.0 (feature level 213), the unmute and follow topic features were not handled correctly in calculating this field.
Sourcepub fn with_count(self, val: u64) -> Self
pub fn with_count(self, val: u64) -> Self
Builder function that sets the UnreadMsgs count.
The total number of unread messages to display.
This includes one-on-one and group direct messages, as well as channel messages that are not muted.
Changes: Before Zulip 8.0 (feature level 213), the unmute and follow topic features were not handled correctly in calculating this field.
Sourcepub const fn old_unreads_missing(&self) -> Option<bool>
pub const fn old_unreads_missing(&self) -> Option<bool>
Gets the UnreadMsgs old_unreads_missing.
Whether this data set was truncated because the user has too many unread messages.
When truncation occurs, only the most recent MAX_UNREAD_MESSAGES (currently 50000) messages will be considered when forming this response.
When true, we recommend that clients display a warning,
as they are likely to produce erroneous results until reloaded with the user having fewer than MAX_UNREAD_MESSAGES unread messages.
Changes: New in Zulip 4.0 (feature level 44).
Sourcepub fn set_old_unreads_missing(&mut self, val: bool)
pub fn set_old_unreads_missing(&mut self, val: bool)
Sets the UnreadMsgs old_unreads_missing.
Whether this data set was truncated because the user has too many unread messages.
When truncation occurs, only the most recent MAX_UNREAD_MESSAGES (currently 50000) messages will be considered when forming this response.
When true, we recommend that clients display a warning,
as they are likely to produce erroneous results until reloaded with the user having fewer than MAX_UNREAD_MESSAGES unread messages.
Changes: New in Zulip 4.0 (feature level 44).
Sourcepub fn unset_old_unreads_missing(&mut self) -> Option<bool>
pub fn unset_old_unreads_missing(&mut self) -> Option<bool>
Unsets the UnreadMsgs old_unreads_missing.
Whether this data set was truncated because the user has too many unread messages.
When truncation occurs, only the most recent MAX_UNREAD_MESSAGES (currently 50000) messages will be considered when forming this response.
When true, we recommend that clients display a warning,
as they are likely to produce erroneous results until reloaded with the user having fewer than MAX_UNREAD_MESSAGES unread messages.
Changes: New in Zulip 4.0 (feature level 44).
Sourcepub fn with_old_unreads_missing(self, val: bool) -> Self
pub fn with_old_unreads_missing(self, val: bool) -> Self
Builder function that sets the UnreadMsgs old_unreads_missing.
Whether this data set was truncated because the user has too many unread messages.
When truncation occurs, only the most recent MAX_UNREAD_MESSAGES (currently 50000) messages will be considered when forming this response.
When true, we recommend that clients display a warning,
as they are likely to produce erroneous results until reloaded with the user having fewer than MAX_UNREAD_MESSAGES unread messages.
Changes: New in Zulip 4.0 (feature level 44).
Source§impl UnreadMsgs
impl UnreadMsgs
Sourcepub fn pms(&self) -> Option<&[UnreadMsgsPm]>
pub fn pms(&self) -> Option<&[UnreadMsgsPm]>
Gets the UnreadMsgs pms.
An array of objects where each object contains 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.
Sourcepub fn set_pms<'a, C: Into<Cow<'a, [UnreadMsgsPm]>>>(&mut self, val: C)
pub fn set_pms<'a, C: Into<Cow<'a, [UnreadMsgsPm]>>>(&mut self, val: C)
Sets the UnreadMsgs pms.
An array of objects where each object contains 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.
Sourcepub fn unset_pms(&mut self) -> Option<Vec<UnreadMsgsPm>>
pub fn unset_pms(&mut self) -> Option<Vec<UnreadMsgsPm>>
Unsets the UnreadMsgs pms.
An array of objects where each object contains 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.
Sourcepub fn with_pms<'a, C: Into<Cow<'a, [UnreadMsgsPm]>>>(self, val: C) -> Self
pub fn with_pms<'a, C: Into<Cow<'a, [UnreadMsgsPm]>>>(self, val: C) -> Self
Builder function that sets the UnreadMsgs pms.
An array of objects where each object contains 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.
Sourcepub fn streams(&self) -> Option<&[UnreadMsgsStream]>
pub fn streams(&self) -> Option<&[UnreadMsgsStream]>
Gets the UnreadMsgs streams.
An array of dictionaries where each dictionary contains details of all unread messages of a single subscribed channel.
This includes muted channels and muted topics, even though those messages are excluded from count.
Changes: Prior to Zulip 5.0 (feature level 90), these objects included a sender_ids property, which listed the set of IDs of users who had sent the unread messages.
Sourcepub fn set_streams<'a, C: Into<Cow<'a, [UnreadMsgsStream]>>>(&mut self, val: C)
pub fn set_streams<'a, C: Into<Cow<'a, [UnreadMsgsStream]>>>(&mut self, val: C)
Sets the UnreadMsgs streams.
An array of dictionaries where each dictionary contains details of all unread messages of a single subscribed channel.
This includes muted channels and muted topics, even though those messages are excluded from count.
Changes: Prior to Zulip 5.0 (feature level 90), these objects included a sender_ids property, which listed the set of IDs of users who had sent the unread messages.
Sourcepub fn unset_streams(&mut self) -> Option<Vec<UnreadMsgsStream>>
pub fn unset_streams(&mut self) -> Option<Vec<UnreadMsgsStream>>
Unsets the UnreadMsgs streams.
An array of dictionaries where each dictionary contains details of all unread messages of a single subscribed channel.
This includes muted channels and muted topics, even though those messages are excluded from count.
Changes: Prior to Zulip 5.0 (feature level 90), these objects included a sender_ids property, which listed the set of IDs of users who had sent the unread messages.
Sourcepub fn with_streams<'a, C: Into<Cow<'a, [UnreadMsgsStream]>>>(
self,
val: C,
) -> Self
pub fn with_streams<'a, C: Into<Cow<'a, [UnreadMsgsStream]>>>( self, val: C, ) -> Self
Builder function that sets the UnreadMsgs streams.
An array of dictionaries where each dictionary contains details of all unread messages of a single subscribed channel.
This includes muted channels and muted topics, even though those messages are excluded from count.
Changes: Prior to Zulip 5.0 (feature level 90), these objects included a sender_ids property, which listed the set of IDs of users who had sent the unread messages.
Sourcepub fn huddles(&self) -> Option<&[UnreadMsgsHuddle]>
pub fn huddles(&self) -> Option<&[UnreadMsgsHuddle]>
Gets the UnreadMsgs huddles.
An array of objects where each object contains details of unread group direct messages with a specific group of users.
Sourcepub fn set_huddles<'a, C: Into<Cow<'a, [UnreadMsgsHuddle]>>>(&mut self, val: C)
pub fn set_huddles<'a, C: Into<Cow<'a, [UnreadMsgsHuddle]>>>(&mut self, val: C)
Sets the UnreadMsgs huddles.
An array of objects where each object contains details of unread group direct messages with a specific group of users.
Sourcepub fn unset_huddles(&mut self) -> Option<Vec<UnreadMsgsHuddle>>
pub fn unset_huddles(&mut self) -> Option<Vec<UnreadMsgsHuddle>>
Unsets the UnreadMsgs huddles.
An array of objects where each object contains details of unread group direct messages with a specific group of users.
Sourcepub fn with_huddles<'a, C: Into<Cow<'a, [UnreadMsgsHuddle]>>>(
self,
val: C,
) -> Self
pub fn with_huddles<'a, C: Into<Cow<'a, [UnreadMsgsHuddle]>>>( self, val: C, ) -> Self
Builder function that sets the UnreadMsgs huddles.
An array of objects where each object contains details of unread group direct messages with a specific group of users.
Sourcepub fn mentions(&self) -> Option<&[u64]>
pub fn mentions(&self) -> Option<&[u64]>
Gets the UnreadMsgs mentions.
Array containing the IDs of all unread messages in which the user was mentioned directly,
and unread non-muted messages in which the user was mentioned through a wildcard.
Changes: Before Zulip 8.0 (feature level 213), the unmute and follow topic features were not handled correctly in calculating this field.
Sourcepub fn set_mentions<'a, C: Into<Cow<'a, [u64]>>>(&mut self, val: C)
pub fn set_mentions<'a, C: Into<Cow<'a, [u64]>>>(&mut self, val: C)
Sets the UnreadMsgs mentions.
Array containing the IDs of all unread messages in which the user was mentioned directly,
and unread non-muted messages in which the user was mentioned through a wildcard.
Changes: Before Zulip 8.0 (feature level 213), the unmute and follow topic features were not handled correctly in calculating this field.
Sourcepub fn unset_mentions(&mut self) -> Option<Vec<u64>>
pub fn unset_mentions(&mut self) -> Option<Vec<u64>>
Unsets the UnreadMsgs mentions.
Array containing the IDs of all unread messages in which the user was mentioned directly,
and unread non-muted messages in which the user was mentioned through a wildcard.
Changes: Before Zulip 8.0 (feature level 213), the unmute and follow topic features were not handled correctly in calculating this field.
Sourcepub fn with_mentions<'a, C: Into<Cow<'a, [u64]>>>(self, val: C) -> Self
pub fn with_mentions<'a, C: Into<Cow<'a, [u64]>>>(self, val: C) -> Self
Builder function that sets the UnreadMsgs mentions.
Array containing the IDs of all unread messages in which the user was mentioned directly,
and unread non-muted messages in which the user was mentioned through a wildcard.
Changes: Before Zulip 8.0 (feature level 213), the unmute and follow topic features were not handled correctly in calculating this field.