Skip to main content

ClientCapabilities

Struct ClientCapabilities 

Source
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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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).

Source

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).

Source

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).

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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).

Source

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).

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ClientCapabilities

Source§

impl Debug for ClientCapabilities

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ClientCapabilities

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ClientCapabilities

Source§

impl PartialEq for ClientCapabilities

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ClientCapabilities

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ClientCapabilities

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more