pub struct ClientCapabilities { /* private fields */ }Expand description
Represents details on features the client supports that are relevant to the format of responses sent by the server.
Implementations§
Source§impl ClientCapabilities
impl ClientCapabilities
Sourcepub const fn notificaiton_settings_null(&self) -> bool
pub const fn notificaiton_settings_null(&self) -> bool
Gets the ClientCapabilities notificaiton_settings_null.
notification_settings_null: Boolean for whether the
client can handle the current API with null values for
channel-level notification settings (which means the channel
is not customized and should inherit the user’s global
notification settings for channel messages).
Changes: New in Zulip 2.1.0. In earlier Zulip releases,
channel-level notification settings were simple booleans.
Sourcepub fn set_notificaiton_settings_null(&mut self, val: bool)
pub fn set_notificaiton_settings_null(&mut self, val: bool)
Sets the ClientCapabilities notificaiton_settings_null.
notification_settings_null: Boolean for whether the
client can handle the current API with null values for
channel-level notification settings (which means the channel
is not customized and should inherit the user’s global
notification settings for channel messages).
Changes: New in Zulip 2.1.0. In earlier Zulip releases,
channel-level notification settings were simple booleans.
Sourcepub fn with_notificaiton_settings_null(self, val: bool) -> Self
pub fn with_notificaiton_settings_null(self, val: bool) -> Self
Builder function that sets the ClientCapabilities notificaiton_settings_null.
notification_settings_null: Boolean for whether the
client can handle the current API with null values for
channel-level notification settings (which means the channel
is not customized and should inherit the user’s global
notification settings for channel messages).
Changes: New in Zulip 2.1.0. In earlier Zulip releases,
channel-level notification settings were simple booleans.
Sourcepub const fn bulk_message_deletion(&self) -> bool
pub const fn bulk_message_deletion(&self) -> bool
Gets the ClientCapabilities bulk_message_deletion.
bulk_message_deletion: Boolean for whether the client’s
handler for the delete_message event type has been
updated to process the new bulk format (with a
message_ids, rather than a singleton message_id).
Otherwise, the server will send delete_message events
in a loop.
Changes: New in Zulip 3.0 (feature level 13). This
capability is for backwards-compatibility; it will be
required in a future server release.
Sourcepub fn set_bulk_message_deletion(&mut self, val: bool)
pub fn set_bulk_message_deletion(&mut self, val: bool)
Sets the ClientCapabilities bulk_message_deletion.
bulk_message_deletion: Boolean for whether the client’s
handler for the delete_message event type has been
updated to process the new bulk format (with a
message_ids, rather than a singleton message_id).
Otherwise, the server will send delete_message events
in a loop.
Changes: New in Zulip 3.0 (feature level 13). This
capability is for backwards-compatibility; it will be
required in a future server release.
Sourcepub fn with_bulk_message_deletion(self, val: bool) -> Self
pub fn with_bulk_message_deletion(self, val: bool) -> Self
Builder function that sets the ClientCapabilities bulk_message_deletion.
bulk_message_deletion: Boolean for whether the client’s
handler for the delete_message event type has been
updated to process the new bulk format (with a
message_ids, rather than a singleton message_id).
Otherwise, the server will send delete_message events
in a loop.
Changes: New in Zulip 3.0 (feature level 13). This
capability is for backwards-compatibility; it will be
required in a future server release.
Sourcepub const fn user_avatar_url_field_optional(&self) -> bool
pub const fn user_avatar_url_field_optional(&self) -> bool
Gets the ClientCapabilities user_avatar_url_field_optional.
user_avatar_url_field_optional: Boolean for whether the
client required avatar URLs for all users, or supports
using GET /avatar/{user_id} to access user avatars. If the
client has this capability, the server may skip sending a
avatar_url field in the realm_user at its sole discretion
to optimize network performance. This is an important optimization
in organizations with 10,000s of users.
Changes: New in Zulip 3.0 (feature level 18).
Sourcepub fn set_user_avatar_url_field_optional(&mut self, val: bool)
pub fn set_user_avatar_url_field_optional(&mut self, val: bool)
Sets the ClientCapabilities user_avatar_url_field_optional.
user_avatar_url_field_optional: Boolean for whether the
client required avatar URLs for all users, or supports
using GET /avatar/{user_id} to access user avatars. If the
client has this capability, the server may skip sending a
avatar_url field in the realm_user at its sole discretion
to optimize network performance. This is an important optimization
in organizations with 10,000s of users.
Changes: New in Zulip 3.0 (feature level 18).
Sourcepub fn with_user_avatar_url_field_optional(self, val: bool) -> Self
pub fn with_user_avatar_url_field_optional(self, val: bool) -> Self
Builder function that sets the ClientCapabilities user_avatar_url_field_optional.
user_avatar_url_field_optional: Boolean for whether the
client required avatar URLs for all users, or supports
using GET /avatar/{user_id} to access user avatars. If the
client has this capability, the server may skip sending a
avatar_url field in the realm_user at its sole discretion
to optimize network performance. This is an important optimization
in organizations with 10,000s of users.
Changes: New in Zulip 3.0 (feature level 18).
Sourcepub const fn stream_typing_notifications(&self) -> bool
pub const fn stream_typing_notifications(&self) -> bool
Gets the ClientCapabilities stream_typing_notifications.
stream_typing_notifications: Boolean for whether the client
supports channel typing notifications.
Changes: New in Zulip 4.0 (feature level 58). This capability is
for backwards-compatibility; it will be required in a
future server release.
Sourcepub fn set_stream_typing_notifications(&mut self, val: bool)
pub fn set_stream_typing_notifications(&mut self, val: bool)
Sets the ClientCapabilities stream_typing_notifications.
stream_typing_notifications: Boolean for whether the client
supports channel typing notifications.
Changes: New in Zulip 4.0 (feature level 58). This capability is
for backwards-compatibility; it will be required in a
future server release.
Sourcepub fn with_stream_typing_notifications(self, val: bool) -> Self
pub fn with_stream_typing_notifications(self, val: bool) -> Self
Builder function that sets the ClientCapabilities stream_typing_notifications.
stream_typing_notifications: Boolean for whether the client
supports channel typing notifications.
Changes: New in Zulip 4.0 (feature level 58). This capability is
for backwards-compatibility; it will be required in a
future server release.
Sourcepub const fn user_settings_object(&self) -> bool
pub const fn user_settings_object(&self) -> bool
Gets the ClientCapabilities user_settings_object.
user_settings_object: Boolean for whether the client supports the modern
user_settings event type. If false, the server will additionally send the
legacy update_global_notifications and update_display_settings event
types.
Changes: New in Zulip 5.0 (feature level 89). This capability is for
backwards-compatibility; it will be removed in a future server release.
Because the feature level 89 API changes were merged together, clients can
safely make a request with this client capability and also request all three
event types (user_settings, update_display_settings,
update_global_notifications), and get exactly one copy of settings data on
any server version. Clients can then use the zulip_feature_level in the
/register response or the presence/absence of a user_settings key to
determine where to look for the data.
Sourcepub fn set_user_settings_object(&mut self, val: bool)
pub fn set_user_settings_object(&mut self, val: bool)
Sets the ClientCapabilities user_settings_object.
user_settings_object: Boolean for whether the client supports the modern
user_settings event type. If false, the server will additionally send the
legacy update_global_notifications and update_display_settings event
types.
Changes: New in Zulip 5.0 (feature level 89). This capability is for
backwards-compatibility; it will be removed in a future server release.
Because the feature level 89 API changes were merged together, clients can
safely make a request with this client capability and also request all three
event types (user_settings, update_display_settings,
update_global_notifications), and get exactly one copy of settings data on
any server version. Clients can then use the zulip_feature_level in the
/register response or the presence/absence of a user_settings key to
determine where to look for the data.
Sourcepub fn with_user_settings_object(self, val: bool) -> Self
pub fn with_user_settings_object(self, val: bool) -> Self
Builder function that sets the ClientCapabilities user_settings_object.
user_settings_object: Boolean for whether the client supports the modern
user_settings event type. If false, the server will additionally send the
legacy update_global_notifications and update_display_settings event
types.
Changes: New in Zulip 5.0 (feature level 89). This capability is for
backwards-compatibility; it will be removed in a future server release.
Because the feature level 89 API changes were merged together, clients can
safely make a request with this client capability and also request all three
event types (user_settings, update_display_settings,
update_global_notifications), and get exactly one copy of settings data on
any server version. Clients can then use the zulip_feature_level in the
/register response or the presence/absence of a user_settings key to
determine where to look for the data.
Sourcepub const fn linkifier_url_template(&self) -> bool
pub const fn linkifier_url_template(&self) -> bool
Gets the ClientCapabilities linkifier_url_template.
linkifier_url_template: Boolean for whether the client accepts
linkifiers that use RFC 6570 compliant
URL templates for linkifying matches. If false or unset, then the
realm_linkifiers array in the /register response will be empty
if present, and no realm_linkifiers events
will be sent to the client.
Changes: New in Zulip 7.0 (feature level 176). This capability
is for backwards-compatibility.
Sourcepub fn set_linkifier_url_template(&mut self, val: bool)
pub fn set_linkifier_url_template(&mut self, val: bool)
Sets the ClientCapabilities linkifier_url_template.
linkifier_url_template: Boolean for whether the client accepts
linkifiers that use RFC 6570 compliant
URL templates for linkifying matches. If false or unset, then the
realm_linkifiers array in the /register response will be empty
if present, and no realm_linkifiers events
will be sent to the client.
Changes: New in Zulip 7.0 (feature level 176). This capability
is for backwards-compatibility.
Sourcepub fn with_linkifier_url_template(self, val: bool) -> Self
pub fn with_linkifier_url_template(self, val: bool) -> Self
Builder function that sets the ClientCapabilities linkifier_url_template.
linkifier_url_template: Boolean for whether the client accepts
linkifiers that use RFC 6570 compliant
URL templates for linkifying matches. If false or unset, then the
realm_linkifiers array in the /register response will be empty
if present, and no realm_linkifiers events
will be sent to the client.
Changes: New in Zulip 7.0 (feature level 176). This capability
is for backwards-compatibility.
Sourcepub const fn user_list_incomplete(&self) -> bool
pub const fn user_list_incomplete(&self) -> bool
Gets the ClientCapabilities user_list_incomplete.
user_list_incomplete: Boolean for whether the client supports not having an
incomplete user database. If true, then the realm_users array in the register
response will not include data for inaccessible users and clients of guest users will
not receive realm_user op:add events for newly created users that are not accessible
to the current user.
Changes: New in Zulip 8.0 (feature level 232). This
capability is for backwards-compatibility.
Sourcepub fn set_user_list_incomplete(&mut self, val: bool)
pub fn set_user_list_incomplete(&mut self, val: bool)
Sets the ClientCapabilities user_list_incomplete.
user_list_incomplete: Boolean for whether the client supports not having an
incomplete user database. If true, then the realm_users array in the register
response will not include data for inaccessible users and clients of guest users will
not receive realm_user op:add events for newly created users that are not accessible
to the current user.
Changes: New in Zulip 8.0 (feature level 232). This
capability is for backwards-compatibility.
Sourcepub fn with_user_list_incomplete(self, val: bool) -> Self
pub fn with_user_list_incomplete(self, val: bool) -> Self
Builder function that sets the ClientCapabilities user_list_incomplete.
user_list_incomplete: Boolean for whether the client supports not having an
incomplete user database. If true, then the realm_users array in the register
response will not include data for inaccessible users and clients of guest users will
not receive realm_user op:add events for newly created users that are not accessible
to the current user.
Changes: New in Zulip 8.0 (feature level 232). This
capability is for backwards-compatibility.
Sourcepub const fn include_deactivated_groups(&self) -> bool
pub const fn include_deactivated_groups(&self) -> bool
Gets the ClientCapabilities include_deactivated_groups.
include_deactivated_groups: Boolean for whether the client can handle
deactivated user groups by themselves. If false, then the realm_user_groups
array in the /register response will only include active groups, clients
will receive a remove event instead of update event when a group is
deactivated and no update event will be sent to the client if a deactivated
user group is renamed.
Changes: New in Zulip 10.0 (feature level 294). This
capability is for backwards-compatibility.
Sourcepub fn set_include_deactivated_groups(&mut self, val: bool)
pub fn set_include_deactivated_groups(&mut self, val: bool)
Sets the ClientCapabilities include_deactivated_groups.
include_deactivated_groups: Boolean for whether the client can handle
deactivated user groups by themselves. If false, then the realm_user_groups
array in the /register response will only include active groups, clients
will receive a remove event instead of update event when a group is
deactivated and no update event will be sent to the client if a deactivated
user group is renamed.
Changes: New in Zulip 10.0 (feature level 294). This
capability is for backwards-compatibility.
Sourcepub fn with_include_deactivated_groups(self, val: bool) -> Self
pub fn with_include_deactivated_groups(self, val: bool) -> Self
Builder function that sets the ClientCapabilities include_deactivated_groups.
include_deactivated_groups: Boolean for whether the client can handle
deactivated user groups by themselves. If false, then the realm_user_groups
array in the /register response will only include active groups, clients
will receive a remove event instead of update event when a group is
deactivated and no update event will be sent to the client if a deactivated
user group is renamed.
Changes: New in Zulip 10.0 (feature level 294). This
capability is for backwards-compatibility.
Sourcepub const fn archived_channels(&self) -> bool
pub const fn archived_channels(&self) -> bool
Gets the ClientCapabilities archived_channels.
archived_channels: Boolean for whether the client supports processing
archived channels in the stream and
subscription event types. If false, the server will not include data
related to archived channels in the register response or in events.
Changes: New in Zulip 10.0 (feature level 315). This allows clients to
access archived channels, without breaking backwards-compatibility for
existing clients.
Sourcepub fn set_archived_channels(&mut self, val: bool)
pub fn set_archived_channels(&mut self, val: bool)
Sets the ClientCapabilities archived_channels.
archived_channels: Boolean for whether the client supports processing
archived channels in the stream and
subscription event types. If false, the server will not include data
related to archived channels in the register response or in events.
Changes: New in Zulip 10.0 (feature level 315). This allows clients to
access archived channels, without breaking backwards-compatibility for
existing clients.
Sourcepub fn with_archived_channels(self, val: bool) -> Self
pub fn with_archived_channels(self, val: bool) -> Self
Builder function that sets the ClientCapabilities archived_channels.
archived_channels: Boolean for whether the client supports processing
archived channels in the stream and
subscription event types. If false, the server will not include data
related to archived channels in the register response or in events.
Changes: New in Zulip 10.0 (feature level 315). This allows clients to
access archived channels, without breaking backwards-compatibility for
existing clients.
Sourcepub const fn empty_topic_name(&self) -> bool
pub const fn empty_topic_name(&self) -> bool
Gets the ClientCapabilities empty_topic_name.
empty_topic_name: Boolean for whether the client supports processing
the empty string as a topic name. Clients not declaring this capability
will be sent the value of realm_empty_topic_display_name found in the
POST /register response instead of the empty string
wherever topic names appear in the register response or events involving
topic names.
Changes: New in Zulip 10.0 (feature level 334). Previously,
the empty string was not a valid topic name.
Sourcepub fn set_empty_topic_name(&mut self, val: bool)
pub fn set_empty_topic_name(&mut self, val: bool)
Sets the ClientCapabilities empty_topic_name.
empty_topic_name: Boolean for whether the client supports processing
the empty string as a topic name. Clients not declaring this capability
will be sent the value of realm_empty_topic_display_name found in the
POST /register response instead of the empty string
wherever topic names appear in the register response or events involving
topic names.
Changes: New in Zulip 10.0 (feature level 334). Previously,
the empty string was not a valid topic name.
Sourcepub fn with_empty_topic_name(self, val: bool) -> Self
pub fn with_empty_topic_name(self, val: bool) -> Self
Builder function that sets the ClientCapabilities empty_topic_name.
empty_topic_name: Boolean for whether the client supports processing
the empty string as a topic name. Clients not declaring this capability
will be sent the value of realm_empty_topic_display_name found in the
POST /register response instead of the empty string
wherever topic names appear in the register response or events involving
topic names.
Changes: New in Zulip 10.0 (feature level 334). Previously,
the empty string was not a valid topic name.
Sourcepub const fn simplified_presence_events(&self) -> bool
pub const fn simplified_presence_events(&self) -> bool
Gets the ClientCapabilities simplified_presence_events.
simplified_presence_events: Boolean for whether the client supports
receiving the presence event type with
user presence data in the modern format. If true, the server will
send these events with the presences field that has the user presence
data in the modern format. Otherwise, these event will contain fields
with legacy format user presence data.
Changes: New in Zulip 11.0 (feature level 419).
Sourcepub fn set_simplified_presence_events(&mut self, val: bool)
pub fn set_simplified_presence_events(&mut self, val: bool)
Sets the ClientCapabilities simplified_presence_events.
simplified_presence_events: Boolean for whether the client supports
receiving the presence event type with
user presence data in the modern format. If true, the server will
send these events with the presences field that has the user presence
data in the modern format. Otherwise, these event will contain fields
with legacy format user presence data.
Changes: New in Zulip 11.0 (feature level 419).
Sourcepub fn with_simplified_presence_events(self, val: bool) -> Self
pub fn with_simplified_presence_events(self, val: bool) -> Self
Builder function that sets the ClientCapabilities simplified_presence_events.
simplified_presence_events: Boolean for whether the client supports
receiving the presence event type with
user presence data in the modern format. If true, the server will
send these events with the presences field that has the user presence
data in the modern format. Otherwise, these event will contain fields
with legacy format user presence data.
Changes: New in Zulip 11.0 (feature level 419).
Trait Implementations§
Source§impl Clone for ClientCapabilities
impl Clone for ClientCapabilities
impl Copy for ClientCapabilities
Source§impl Debug for ClientCapabilities
impl Debug for ClientCapabilities
Source§impl<'de> Deserialize<'de> for ClientCapabilities
impl<'de> Deserialize<'de> for ClientCapabilities
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>,
impl Eq for ClientCapabilities
Source§impl PartialEq for ClientCapabilities
impl PartialEq for ClientCapabilities
Source§impl Serialize for ClientCapabilities
impl Serialize for ClientCapabilities
impl StructuralPartialEq for ClientCapabilities
Auto Trait Implementations§
impl Freeze for ClientCapabilities
impl RefUnwindSafe for ClientCapabilities
impl Send for ClientCapabilities
impl Sync for ClientCapabilities
impl Unpin for ClientCapabilities
impl UnsafeUnpin for ClientCapabilities
impl UnwindSafe for ClientCapabilities
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
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
key and return true if they are equal.