pub struct Request { /* private fields */ }Expand description
Represents the request to the Register Zulip API.
Implementations§
Source§impl Request
impl Request
Sourcepub const fn apply_markdown(&self) -> Option<bool>
pub const fn apply_markdown(&self) -> Option<bool>
Gets the Request apply_markdown.
Set to true if you would like the content to be rendered in HTML
format (otherwise the API will return the raw text that the user entered)
Sourcepub fn set_apply_markdown(&mut self, val: bool)
pub fn set_apply_markdown(&mut self, val: bool)
Sets the Request apply_markdown.
Set to true if you would like the content to be rendered in HTML
format (otherwise the API will return the raw text that the user entered)
Sourcepub fn unset_apply_markdown(&mut self) -> Option<bool>
pub fn unset_apply_markdown(&mut self) -> Option<bool>
Unsets the Request apply_markdown.
Set to true if you would like the content to be rendered in HTML
format (otherwise the API will return the raw text that the user entered)
Sourcepub fn with_apply_markdown(self, val: bool) -> Self
pub fn with_apply_markdown(self, val: bool) -> Self
Builder function that sets the Request apply_markdown.
Set to true if you would like the content to be rendered in HTML
format (otherwise the API will return the raw text that the user entered)
Sourcepub const fn client_gravatar(&self) -> Option<bool>
pub const fn client_gravatar(&self) -> Option<bool>
Gets the Request client_gravatar.
Whether the client supports computing gravatars URLs. If
enabled, avatar_url will be included in the response only
if there is a Zulip avatar, and will be null for users who
are using gravatar as their avatar. This option
significantly reduces the compressed size of user data,
since gravatar URLs are long, random strings and thus do not
compress well. The client_gravatar field is set to true if
clients can compute their own gravatars.
The default value is true for authenticated requests and
false for unauthenticated requests.
Passing true in an unauthenticated request is an error.
Changes: Before Zulip 6.0 (feature level 149), this
parameter was silently ignored and processed as though it
were false in unauthenticated requests.
Sourcepub fn set_client_gravatar(&mut self, val: bool)
pub fn set_client_gravatar(&mut self, val: bool)
Sets the Request client_gravatar.
Whether the client supports computing gravatars URLs. If
enabled, avatar_url will be included in the response only
if there is a Zulip avatar, and will be null for users who
are using gravatar as their avatar. This option
significantly reduces the compressed size of user data,
since gravatar URLs are long, random strings and thus do not
compress well. The client_gravatar field is set to true if
clients can compute their own gravatars.
The default value is true for authenticated requests and
false for unauthenticated requests.
Passing true in an unauthenticated request is an error.
Changes: Before Zulip 6.0 (feature level 149), this
parameter was silently ignored and processed as though it
were false in unauthenticated requests.
Sourcepub fn unset_client_gravatar(&mut self) -> Option<bool>
pub fn unset_client_gravatar(&mut self) -> Option<bool>
Unsets the Request client_gravatar.
Whether the client supports computing gravatars URLs. If
enabled, avatar_url will be included in the response only
if there is a Zulip avatar, and will be null for users who
are using gravatar as their avatar. This option
significantly reduces the compressed size of user data,
since gravatar URLs are long, random strings and thus do not
compress well. The client_gravatar field is set to true if
clients can compute their own gravatars.
The default value is true for authenticated requests and
false for unauthenticated requests.
Passing true in an unauthenticated request is an error.
Changes: Before Zulip 6.0 (feature level 149), this
parameter was silently ignored and processed as though it
were false in unauthenticated requests.
Sourcepub fn with_client_gravatar(self, val: bool) -> Self
pub fn with_client_gravatar(self, val: bool) -> Self
Builder function that sets the Request client_gravatar.
Whether the client supports computing gravatars URLs. If
enabled, avatar_url will be included in the response only
if there is a Zulip avatar, and will be null for users who
are using gravatar as their avatar. This option
significantly reduces the compressed size of user data,
since gravatar URLs are long, random strings and thus do not
compress well. The client_gravatar field is set to true if
clients can compute their own gravatars.
The default value is true for authenticated requests and
false for unauthenticated requests.
Passing true in an unauthenticated request is an error.
Changes: Before Zulip 6.0 (feature level 149), this
parameter was silently ignored and processed as though it
were false in unauthenticated requests.
Sourcepub const fn include_subscribers(&self) -> Option<IncludeSubscribers>
pub const fn include_subscribers(&self) -> Option<IncludeSubscribers>
Gets the Request include_subscribers.
Whether each returned channel object should include a subscribers
field containing a list of the user IDs of its subscribers.
Sourcepub fn set_include_subscribers(&mut self, val: IncludeSubscribers)
pub fn set_include_subscribers(&mut self, val: IncludeSubscribers)
Sets the Request include_subscribers.
Whether each returned channel object should include a subscribers
field containing a list of the user IDs of its subscribers.
Sourcepub fn unset_include_subscribers(&mut self) -> Option<IncludeSubscribers>
pub fn unset_include_subscribers(&mut self) -> Option<IncludeSubscribers>
Unsets the Request include_subscribers.
Whether each returned channel object should include a subscribers
field containing a list of the user IDs of its subscribers.
Sourcepub fn with_include_subscribers(self, val: IncludeSubscribers) -> Self
pub fn with_include_subscribers(self, val: IncludeSubscribers) -> Self
Builder function that sets the Request include_subscribers.
Whether each returned channel object should include a subscribers
field containing a list of the user IDs of its subscribers.
Sourcepub const fn slim_presence(&self) -> Option<bool>
pub const fn slim_presence(&self) -> Option<bool>
Gets the Request slim_presence.
If true, the presences object returned in the response will be keyed
by user ID and the entry for each user’s presence data will be in the
modern format.
Changes: New in Zulip 3.0 (no feature level; API unstable).
Sourcepub fn set_slim_presence(&mut self, val: bool)
pub fn set_slim_presence(&mut self, val: bool)
Sets the Request slim_presence.
If true, the presences object returned in the response will be keyed
by user ID and the entry for each user’s presence data will be in the
modern format.
Changes: New in Zulip 3.0 (no feature level; API unstable).
Sourcepub fn unset_slim_presence(&mut self) -> Option<bool>
pub fn unset_slim_presence(&mut self) -> Option<bool>
Unsets the Request slim_presence.
If true, the presences object returned in the response will be keyed
by user ID and the entry for each user’s presence data will be in the
modern format.
Changes: New in Zulip 3.0 (no feature level; API unstable).
Sourcepub fn with_slim_presence(self, val: bool) -> Self
pub fn with_slim_presence(self, val: bool) -> Self
Builder function that sets the Request slim_presence.
If true, the presences object returned in the response will be keyed
by user ID and the entry for each user’s presence data will be in the
modern format.
Changes: New in Zulip 3.0 (no feature level; API unstable).
Sourcepub const fn presence_history_limit_days(&self) -> Option<u64>
pub const fn presence_history_limit_days(&self) -> Option<u64>
Gets the Request presence_history_limit_days.
Limits how far back in time to fetch user presence data. If not specified,
defaults to 14 days. A value of N means that the oldest presence data
fetched will be from at most N days ago.
Changes: New in Zulip 10.0 (feature level 288).
Sourcepub fn set_presence_history_limit_days(&mut self, val: u64)
pub fn set_presence_history_limit_days(&mut self, val: u64)
Sets the Request presence_history_limit_days.
Limits how far back in time to fetch user presence data. If not specified,
defaults to 14 days. A value of N means that the oldest presence data
fetched will be from at most N days ago.
Changes: New in Zulip 10.0 (feature level 288).
Sourcepub fn unset_presence_history_limit_days(&mut self) -> Option<u64>
pub fn unset_presence_history_limit_days(&mut self) -> Option<u64>
Unsets the Request presence_history_limit_days.
Limits how far back in time to fetch user presence data. If not specified,
defaults to 14 days. A value of N means that the oldest presence data
fetched will be from at most N days ago.
Changes: New in Zulip 10.0 (feature level 288).
Sourcepub fn with_presence_history_limit_days(self, val: u64) -> Self
pub fn with_presence_history_limit_days(self, val: u64) -> Self
Builder function that sets the Request presence_history_limit_days.
Limits how far back in time to fetch user presence data. If not specified,
defaults to 14 days. A value of N means that the oldest presence data
fetched will be from at most N days ago.
Changes: New in Zulip 10.0 (feature level 288).
Sourcepub const fn all_public_streams(&self) -> Option<bool>
pub const fn all_public_streams(&self) -> Option<bool>
Gets the Request all_public_streams.
Whether you would like to request message events from all public
channels. Useful for workflow bots that you’d like to see all new messages
sent to public channels. (You can also subscribe the user to private channels).
Sourcepub fn set_all_public_streams(&mut self, val: bool)
pub fn set_all_public_streams(&mut self, val: bool)
Sets the Request all_public_streams.
Whether you would like to request message events from all public
channels. Useful for workflow bots that you’d like to see all new messages
sent to public channels. (You can also subscribe the user to private channels).
Sourcepub fn unset_all_public_streams(&mut self) -> Option<bool>
pub fn unset_all_public_streams(&mut self) -> Option<bool>
Unsets the Request all_public_streams.
Whether you would like to request message events from all public
channels. Useful for workflow bots that you’d like to see all new messages
sent to public channels. (You can also subscribe the user to private channels).
Sourcepub fn with_all_public_streams(self, val: bool) -> Self
pub fn with_all_public_streams(self, val: bool) -> Self
Builder function that sets the Request all_public_streams.
Whether you would like to request message events from all public
channels. Useful for workflow bots that you’d like to see all new messages
sent to public channels. (You can also subscribe the user to private channels).
Sourcepub const fn client_capabilities(&self) -> Option<ClientCapabilities>
pub const fn client_capabilities(&self) -> Option<ClientCapabilities>
Gets the Request client_capabilities.
Dictionary containing details on features the client supports that are
relevant to the format of responses sent by the server.
Sourcepub fn set_client_capabilities(&mut self, val: ClientCapabilities)
pub fn set_client_capabilities(&mut self, val: ClientCapabilities)
Sets the Request client_capabilities.
Dictionary containing details on features the client supports that are
relevant to the format of responses sent by the server.
Sourcepub fn unset_client_capabilities(&mut self) -> Option<ClientCapabilities>
pub fn unset_client_capabilities(&mut self) -> Option<ClientCapabilities>
Unsets the Request client_capabilities.
Dictionary containing details on features the client supports that are
relevant to the format of responses sent by the server.
Sourcepub fn with_client_capabilities(self, val: ClientCapabilities) -> Self
pub fn with_client_capabilities(self, val: ClientCapabilities) -> Self
Builder function that sets the Request client_capabilities.
Dictionary containing details on features the client supports that are
relevant to the format of responses sent by the server.
Source§impl Request
impl Request
Sourcepub fn event_types(&self) -> Option<&[EventType]>
pub fn event_types(&self) -> Option<&[EventType]>
Gets the Request event_types.
A JSON-encoded array indicating which types of events you’re interested
in. Values that you might find useful include:
Sourcepub fn set_event_types<'a, C: Into<Cow<'a, [EventType]>>>(&mut self, val: C)
pub fn set_event_types<'a, C: Into<Cow<'a, [EventType]>>>(&mut self, val: C)
Sets the Request event_types.
A JSON-encoded array indicating which types of events you’re interested
in. Values that you might find useful include:
Sourcepub fn unset_event_types(&mut self) -> Option<Vec<EventType>>
pub fn unset_event_types(&mut self) -> Option<Vec<EventType>>
Unsets the Request event_types.
A JSON-encoded array indicating which types of events you’re interested
in. Values that you might find useful include:
Sourcepub fn with_event_types<'a, C: Into<Cow<'a, [EventType]>>>(self, val: C) -> Self
pub fn with_event_types<'a, C: Into<Cow<'a, [EventType]>>>(self, val: C) -> Self
Builder function that sets the Request event_types.
A JSON-encoded array indicating which types of events you’re interested
in. Values that you might find useful include:
Sourcepub fn fetch_event_types(&self) -> Option<&[EventType]>
pub fn fetch_event_types(&self) -> Option<&[EventType]>
Gets the Request fetch_event_types.
Same as the event_types parameter except that the values in
fetch_event_types are used to fetch initial data. If
fetch_event_types is not provided, event_types is used and if
event_types is not provided, this parameter defaults to null.
Event types not supported by the server are ignored, in order to simplify
the implementation of client apps that support multiple server versions.
Sourcepub fn set_fetch_event_types<'a, C: Into<Cow<'a, [EventType]>>>(
&mut self,
val: C,
)
pub fn set_fetch_event_types<'a, C: Into<Cow<'a, [EventType]>>>( &mut self, val: C, )
Sets the Request fetch_event_types.
Same as the event_types parameter except that the values in
fetch_event_types are used to fetch initial data. If
fetch_event_types is not provided, event_types is used and if
event_types is not provided, this parameter defaults to null.
Event types not supported by the server are ignored, in order to simplify
the implementation of client apps that support multiple server versions.
Sourcepub fn unset_fetch_event_types(&mut self) -> Option<Vec<EventType>>
pub fn unset_fetch_event_types(&mut self) -> Option<Vec<EventType>>
Unsets the Request fetch_event_types.
Same as the event_types parameter except that the values in
fetch_event_types are used to fetch initial data. If
fetch_event_types is not provided, event_types is used and if
event_types is not provided, this parameter defaults to null.
Event types not supported by the server are ignored, in order to simplify
the implementation of client apps that support multiple server versions.
Sourcepub fn with_fetch_event_types<'a, C: Into<Cow<'a, [EventType]>>>(
self,
val: C,
) -> Self
pub fn with_fetch_event_types<'a, C: Into<Cow<'a, [EventType]>>>( self, val: C, ) -> Self
Builder function that sets the Request fetch_event_types.
Same as the event_types parameter except that the values in
fetch_event_types are used to fetch initial data. If
fetch_event_types is not provided, event_types is used and if
event_types is not provided, this parameter defaults to null.
Event types not supported by the server are ignored, in order to simplify
the implementation of client apps that support multiple server versions.
Sourcepub fn narrow(&self) -> Option<&[NarrowTuple]>
pub fn narrow(&self) -> Option<&[NarrowTuple]>
Gets the Request narrow.
A JSON-encoded array of arrays of length 2 indicating the
narrow filter(s) for which you’d
like to receive events for.
For example, to receive events for direct messages (including
group direct messages) received by the user, one can use
"narrow": [["is", "dm"]].
Unlike the API for fetching messages,
this narrow parameter is simply a filter on messages that the
user receives through their channel subscriptions (or because
they are a recipient of a direct message).
This means that a client that requests a narrow filter of
[["channel", "Denmark"]] will receive events for new messages
sent to that channel while the user is subscribed to that
channel. The client will not receive any message events at all
if the user is not subscribed to "Denmark".
Newly created bot users are not usually subscribed to any
channels, so bots using this API need to be
subscribed to any channels whose messages
you’d like them to process using this endpoint.
See the all_public_streams parameter for how to process all
public channel messages in an organization.
Changes: See changes section
of search/narrow filter documentation.
Sourcepub fn set_narrow<'a, C: Into<Cow<'a, [NarrowTuple]>>>(&mut self, val: C)
pub fn set_narrow<'a, C: Into<Cow<'a, [NarrowTuple]>>>(&mut self, val: C)
Sets the Request narrow.
A JSON-encoded array of arrays of length 2 indicating the
narrow filter(s) for which you’d
like to receive events for.
For example, to receive events for direct messages (including
group direct messages) received by the user, one can use
"narrow": [["is", "dm"]].
Unlike the API for fetching messages,
this narrow parameter is simply a filter on messages that the
user receives through their channel subscriptions (or because
they are a recipient of a direct message).
This means that a client that requests a narrow filter of
[["channel", "Denmark"]] will receive events for new messages
sent to that channel while the user is subscribed to that
channel. The client will not receive any message events at all
if the user is not subscribed to "Denmark".
Newly created bot users are not usually subscribed to any
channels, so bots using this API need to be
subscribed to any channels whose messages
you’d like them to process using this endpoint.
See the all_public_streams parameter for how to process all
public channel messages in an organization.
Changes: See changes section
of search/narrow filter documentation.
Sourcepub fn unset_narrow(&mut self) -> Option<Vec<NarrowTuple>>
pub fn unset_narrow(&mut self) -> Option<Vec<NarrowTuple>>
Unsets the Request narrow.
A JSON-encoded array of arrays of length 2 indicating the
narrow filter(s) for which you’d
like to receive events for.
For example, to receive events for direct messages (including
group direct messages) received by the user, one can use
"narrow": [["is", "dm"]].
Unlike the API for fetching messages,
this narrow parameter is simply a filter on messages that the
user receives through their channel subscriptions (or because
they are a recipient of a direct message).
This means that a client that requests a narrow filter of
[["channel", "Denmark"]] will receive events for new messages
sent to that channel while the user is subscribed to that
channel. The client will not receive any message events at all
if the user is not subscribed to "Denmark".
Newly created bot users are not usually subscribed to any
channels, so bots using this API need to be
subscribed to any channels whose messages
you’d like them to process using this endpoint.
See the all_public_streams parameter for how to process all
public channel messages in an organization.
Changes: See changes section
of search/narrow filter documentation.
Sourcepub fn with_narrow<'a, C: Into<Cow<'a, [NarrowTuple]>>>(self, val: C) -> Self
pub fn with_narrow<'a, C: Into<Cow<'a, [NarrowTuple]>>>(self, val: C) -> Self
Builder function that sets the Request narrow.
A JSON-encoded array of arrays of length 2 indicating the
narrow filter(s) for which you’d
like to receive events for.
For example, to receive events for direct messages (including
group direct messages) received by the user, one can use
"narrow": [["is", "dm"]].
Unlike the API for fetching messages,
this narrow parameter is simply a filter on messages that the
user receives through their channel subscriptions (or because
they are a recipient of a direct message).
This means that a client that requests a narrow filter of
[["channel", "Denmark"]] will receive events for new messages
sent to that channel while the user is subscribed to that
channel. The client will not receive any message events at all
if the user is not subscribed to "Denmark".
Newly created bot users are not usually subscribed to any
channels, so bots using this API need to be
subscribed to any channels whose messages
you’d like them to process using this endpoint.
See the all_public_streams parameter for how to process all
public channel messages in an organization.
Changes: See changes section
of search/narrow filter documentation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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 Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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.