pub struct UserStatus { /* private fields */ }Expand description
Represents the status details of a user with the key of the object being the ID of the user.
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 UserStatus
impl UserStatus
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new UserStatus.
Source§impl UserStatus
impl UserStatus
Sourcepub const fn away(&self) -> Option<bool>
pub const fn away(&self) -> Option<bool>
Gets the UserStatus away.
If present, the user has marked themself "away".
Changes: Deprecated in Zulip 6.0 (feature level 148);
starting with that feature level,
away is a legacy way to access the user’s presence_enabled setting,
with away = !presence_enabled.
To be removed in a future release.
Sourcepub fn set_away(&mut self, val: bool)
pub fn set_away(&mut self, val: bool)
Sets the UserStatus away.
If present, the user has marked themself "away".
Changes: Deprecated in Zulip 6.0 (feature level 148);
starting with that feature level,
away is a legacy way to access the user’s presence_enabled setting,
with away = !presence_enabled.
To be removed in a future release.
Sourcepub fn unset_away(&mut self) -> Option<bool>
pub fn unset_away(&mut self) -> Option<bool>
Unsets the UserStatus away.
If present, the user has marked themself "away".
Changes: Deprecated in Zulip 6.0 (feature level 148);
starting with that feature level,
away is a legacy way to access the user’s presence_enabled setting,
with away = !presence_enabled.
To be removed in a future release.
Sourcepub fn with_away(self, val: bool) -> Self
pub fn with_away(self, val: bool) -> Self
Builder function that sets the UserStatus away.
If present, the user has marked themself "away".
Changes: Deprecated in Zulip 6.0 (feature level 148);
starting with that feature level,
away is a legacy way to access the user’s presence_enabled setting,
with away = !presence_enabled.
To be removed in a future release.
Sourcepub const fn reaction_type(&self) -> Option<ReactionType>
pub const fn reaction_type(&self) -> Option<ReactionType>
Gets the UserStatus reaction_type.
If present, a string indicating the type of emoji.
Sourcepub fn set_reaction_type(&mut self, val: ReactionType)
pub fn set_reaction_type(&mut self, val: ReactionType)
Sets the UserStatus reaction_type.
If present, a string indicating the type of emoji.
Sourcepub fn unset_reaction_type(&mut self) -> Option<ReactionType>
pub fn unset_reaction_type(&mut self) -> Option<ReactionType>
Unsets the UserStatus reaction_type.
If present, a string indicating the type of emoji.
Sourcepub fn with_reaction_type(self, val: ReactionType) -> Self
pub fn with_reaction_type(self, val: ReactionType) -> Self
Builder function that sets the UserStatus reaction_type.
If present, a string indicating the type of emoji.
Source§impl UserStatus
impl UserStatus
Sourcepub fn status_text(&self) -> Option<&str>
pub fn status_text(&self) -> Option<&str>
Gets the UserStatus status_text.
If present, the text content of the user’s status message.
Sourcepub fn set_status_text<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_status_text<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the UserStatus status_text.
If present, the text content of the user’s status message.
Sourcepub fn unset_status_text(&mut self) -> Option<String>
pub fn unset_status_text(&mut self) -> Option<String>
Unsets the UserStatus status_text.
If present, the text content of the user’s status message.
Sourcepub fn with_status_text<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_status_text<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the UserStatus status_text.
If present, the text content of the user’s status message.
Sourcepub fn emoji_name(&self) -> Option<&str>
pub fn emoji_name(&self) -> Option<&str>
Gets the UserStatus emoji_name.
If present, the name for the emoji to associate with the user’s status. Changes: New in Zulip 5.0 (feature level 86).
Sourcepub fn set_emoji_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_emoji_name<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the UserStatus emoji_name.
If present, the name for the emoji to associate with the user’s status. Changes: New in Zulip 5.0 (feature level 86).
Sourcepub fn unset_emoji_name(&mut self) -> Option<String>
pub fn unset_emoji_name(&mut self) -> Option<String>
Unsets the UserStatus emoji_name.
If present, the name for the emoji to associate with the user’s status. Changes: New in Zulip 5.0 (feature level 86).
Sourcepub fn with_emoji_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_emoji_name<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the UserStatus emoji_name.
If present, the name for the emoji to associate with the user’s status. Changes: New in Zulip 5.0 (feature level 86).
Sourcepub fn emoji_code(&self) -> Option<&str>
pub fn emoji_code(&self) -> Option<&str>
Gets the UserStatus emoji_code.
If present, a unique identifier, defining the specific emoji codepoint requested, within the namespace of the reaction_type.
Changes: New in Zulip 5.0 (feature level 86).
Sourcepub fn set_emoji_code<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
pub fn set_emoji_code<'a, C: Into<Cow<'a, str>>>(&mut self, val: C)
Sets the UserStatus emoji_code.
If present, a unique identifier, defining the specific emoji codepoint requested, within the namespace of the reaction_type.
Changes: New in Zulip 5.0 (feature level 86).
Sourcepub fn unset_emoji_code(&mut self) -> Option<String>
pub fn unset_emoji_code(&mut self) -> Option<String>
Unsets the UserStatus emoji_code.
If present, a unique identifier, defining the specific emoji codepoint requested, within the namespace of the reaction_type.
Changes: New in Zulip 5.0 (feature level 86).
Sourcepub fn with_emoji_code<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
pub fn with_emoji_code<'a, C: Into<Cow<'a, str>>>(self, val: C) -> Self
Builder function that sets the UserStatus emoji_code.
If present, a unique identifier, defining the specific emoji codepoint requested, within the namespace of the reaction_type.
Changes: New in Zulip 5.0 (feature level 86).