pub struct Response { /* private fields */ }Expand description
Represents the response to a Send Message API request.
Implementations§
Source§impl Response
impl Response
Sourcepub const fn id(&self) -> Option<u64>
pub const fn id(&self) -> Option<u64>
Gets the Response id.
Unique ID assigned to the sent message.
Sourcepub fn set_id(&mut self, val: u64)
pub fn set_id(&mut self, val: u64)
Sets the Response id.
Unique ID assigned to the sent message.
Sourcepub fn unset_id(&mut self) -> Option<u64>
pub fn unset_id(&mut self) -> Option<u64>
Unsets the Response id.
Unique ID assigned to the sent message.
Sourcepub fn with_id(self, val: u64) -> Self
pub fn with_id(self, val: u64) -> Self
Builder function that sets the Response id.
Unique ID assigned to the sent message.
Sourcepub const fn automatic_new_visibility_policy(&self) -> Option<VisibilityPolicy>
pub const fn automatic_new_visibility_policy(&self) -> Option<VisibilityPolicy>
Gets the Response automatic_new_visibility_policy.
If the message’s sender had configured their visibility policy settings
to potentially automatically follow or unmute topics when sending messages,
and one of these policies did in fact change the user’s visibility policy
for the topic where this message was sent, the new value for that user’s
visibility policy for the recipient topic.
Only present if the sender’s visibility was in fact changed.
The value can be either unmuted or followed.
Clients will also be notified about the change in policy via a
user_topic event as usual. This field is intended to be used by clients
to explicitly inform the user when a topic’s visibility policy was changed
automatically due to sending a message.
For example, the Zulip web application uses this field to decide whether
to display a warning or notice suggesting to unmute the topic after
sending a message to a muted channel. Such a notice would be confusing in
the event that the act of sending the message had already resulted in the
user automatically unmuting or following the topic in question.
Changes: New in Zulip 8.0 (feature level 218).
Sourcepub fn set_automatic_new_visibility_policy(&mut self, val: VisibilityPolicy)
pub fn set_automatic_new_visibility_policy(&mut self, val: VisibilityPolicy)
Sets the Response automatic_new_visibility_policy.
If the message’s sender had configured their visibility policy settings
to potentially automatically follow or unmute topics when sending messages,
and one of these policies did in fact change the user’s visibility policy
for the topic where this message was sent, the new value for that user’s
visibility policy for the recipient topic.
Only present if the sender’s visibility was in fact changed.
The value can be either unmuted or followed.
Clients will also be notified about the change in policy via a
user_topic event as usual. This field is intended to be used by clients
to explicitly inform the user when a topic’s visibility policy was changed
automatically due to sending a message.
For example, the Zulip web application uses this field to decide whether
to display a warning or notice suggesting to unmute the topic after
sending a message to a muted channel. Such a notice would be confusing in
the event that the act of sending the message had already resulted in the
user automatically unmuting or following the topic in question.
Changes: New in Zulip 8.0 (feature level 218).
Sourcepub fn unset_automatic_new_visibility_policy(
&mut self,
) -> Option<VisibilityPolicy>
pub fn unset_automatic_new_visibility_policy( &mut self, ) -> Option<VisibilityPolicy>
Unsets the Response automatic_new_visibility_policy.
If the message’s sender had configured their visibility policy settings
to potentially automatically follow or unmute topics when sending messages,
and one of these policies did in fact change the user’s visibility policy
for the topic where this message was sent, the new value for that user’s
visibility policy for the recipient topic.
Only present if the sender’s visibility was in fact changed.
The value can be either unmuted or followed.
Clients will also be notified about the change in policy via a
user_topic event as usual. This field is intended to be used by clients
to explicitly inform the user when a topic’s visibility policy was changed
automatically due to sending a message.
For example, the Zulip web application uses this field to decide whether
to display a warning or notice suggesting to unmute the topic after
sending a message to a muted channel. Such a notice would be confusing in
the event that the act of sending the message had already resulted in the
user automatically unmuting or following the topic in question.
Changes: New in Zulip 8.0 (feature level 218).
Sourcepub fn with_automatic_new_visibility_policy(self, val: VisibilityPolicy) -> Self
pub fn with_automatic_new_visibility_policy(self, val: VisibilityPolicy) -> Self
Builder function that sets the Response automatic_new_visibility_policy.
If the message’s sender had configured their visibility policy settings
to potentially automatically follow or unmute topics when sending messages,
and one of these policies did in fact change the user’s visibility policy
for the topic where this message was sent, the new value for that user’s
visibility policy for the recipient topic.
Only present if the sender’s visibility was in fact changed.
The value can be either unmuted or followed.
Clients will also be notified about the change in policy via a
user_topic event as usual. This field is intended to be used by clients
to explicitly inform the user when a topic’s visibility policy was changed
automatically due to sending a message.
For example, the Zulip web application uses this field to decide whether
to display a warning or notice suggesting to unmute the topic after
sending a message to a muted channel. Such a notice would be confusing in
the event that the act of sending the message had already resulted in the
user automatically unmuting or following the topic in question.
Changes: New in Zulip 8.0 (feature level 218).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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 Response
Source§impl Response for Response
impl Response for Response
Source§fn with_msg<'a, C: Into<Cow<'a, str>>>(self, msg: C) -> Self
fn with_msg<'a, C: Into<Cow<'a, str>>>(self, msg: C) -> Self
msg field.Source§fn set_result(&mut self, result: ApiResult)
fn set_result(&mut self, result: ApiResult)
result field.Source§fn with_result(self, result: ApiResult) -> Self
fn with_result(self, result: ApiResult) -> Self
result field.Source§fn with_code(self, code: ErrorCode) -> Self
fn with_code(self, code: ErrorCode) -> Self
code field.Source§fn ignored_parameters_unsupported(&self) -> Option<&[String]>
fn ignored_parameters_unsupported(&self) -> Option<&[String]>
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
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.