pub struct ModernPresenceFormat { /* private fields */ }Expand description
Represents presence data (modern format) for the user with the specified ID.
Implementations§
Source§impl ModernPresenceFormat
impl ModernPresenceFormat
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new ModernPresenceFormat.
Source§impl ModernPresenceFormat
impl ModernPresenceFormat
Sourcepub const fn active_timestamp(&self) -> Option<u64>
pub const fn active_timestamp(&self) -> Option<u64>
Gets the ModernPresenceFormat active_timestamp.
The UNIX timestamp of the last time a client connected to Zulip reported that the user was actually present
(e.g. via focusing a browser window or interacting with a computer running the desktop app).
Clients should display users with a current active_timestamp as fully present.
Sourcepub fn set_active_timestamp(&mut self, val: u64)
pub fn set_active_timestamp(&mut self, val: u64)
Sets the ModernPresenceFormat active_timestamp.
The UNIX timestamp of the last time a client connected to Zulip reported that the user was actually present
(e.g. via focusing a browser window or interacting with a computer running the desktop app).
Clients should display users with a current active_timestamp as fully present.
Sourcepub fn unset_active_timestamp(&mut self) -> Option<u64>
pub fn unset_active_timestamp(&mut self) -> Option<u64>
Unsets the ModernPresenceFormat active_timestamp.
The UNIX timestamp of the last time a client connected to Zulip reported that the user was actually present
(e.g. via focusing a browser window or interacting with a computer running the desktop app).
Clients should display users with a current active_timestamp as fully present.
Sourcepub fn with_active_timestamp(self, val: u64) -> Self
pub fn with_active_timestamp(self, val: u64) -> Self
Builder function that sets the ModernPresenceFormat active_timestamp.
The UNIX timestamp of the last time a client connected to Zulip reported that the user was actually present
(e.g. via focusing a browser window or interacting with a computer running the desktop app).
Clients should display users with a current active_timestamp as fully present.
Sourcepub const fn idle_timestamp(&self) -> Option<u64>
pub const fn idle_timestamp(&self) -> Option<u64>
Gets the ModernPresenceFormat idle_timestamp.
The UNIX timestamp of the last time the user had a client connected to Zulip,
including idle clients where the user hasn’t interacted with the system recently.
The Zulip server has no way of distinguishing whether an idle web app user is at their computer,
but hasn’t interacted with the Zulip tab recently, or simply left their desktop computer on when they left.
Thus, clients should display users with a current idle_timestamp but no current active_timestamp as potentially present.
Sourcepub fn set_idle_timestamp(&mut self, val: u64)
pub fn set_idle_timestamp(&mut self, val: u64)
Sets the ModernPresenceFormat idle_timestamp.
The UNIX timestamp of the last time the user had a client connected to Zulip,
including idle clients where the user hasn’t interacted with the system recently.
The Zulip server has no way of distinguishing whether an idle web app user is at their computer,
but hasn’t interacted with the Zulip tab recently, or simply left their desktop computer on when they left.
Thus, clients should display users with a current idle_timestamp but no current active_timestamp as potentially present.
Sourcepub fn unset_idle_timestamp(&mut self) -> Option<u64>
pub fn unset_idle_timestamp(&mut self) -> Option<u64>
Unsets the ModernPresenceFormat idle_timestamp.
The UNIX timestamp of the last time the user had a client connected to Zulip,
including idle clients where the user hasn’t interacted with the system recently.
The Zulip server has no way of distinguishing whether an idle web app user is at their computer,
but hasn’t interacted with the Zulip tab recently, or simply left their desktop computer on when they left.
Thus, clients should display users with a current idle_timestamp but no current active_timestamp as potentially present.
Sourcepub fn with_idle_timestamp(self, val: u64) -> Self
pub fn with_idle_timestamp(self, val: u64) -> Self
Builder function that sets the ModernPresenceFormat idle_timestamp.
The UNIX timestamp of the last time the user had a client connected to Zulip,
including idle clients where the user hasn’t interacted with the system recently.
The Zulip server has no way of distinguishing whether an idle web app user is at their computer,
but hasn’t interacted with the Zulip tab recently, or simply left their desktop computer on when they left.
Thus, clients should display users with a current idle_timestamp but no current active_timestamp as potentially present.