pub struct Request { /* private fields */ }Expand description
Represents the request for the Update Message Flags for Narrow Zulip API endpoint.
See update-message-flags-for-narrow for details.
Implementations§
Source§impl Request
impl Request
Sourcepub const fn anchor(&self) -> Anchor
pub const fn anchor(&self) -> Anchor
Gets the Request anchor.
Represents an anchor updating of flags.
Either an integer message ID, or a special string values for when
the client wants the server to compute the anchor to use.
Sourcepub fn set_anchor(&mut self, val: Anchor)
pub fn set_anchor(&mut self, val: Anchor)
Sets the Request anchor.
Represents an anchor updating of flags.
Either an integer message ID, or a special string values for when
the client wants the server to compute the anchor to use.
Sourcepub fn with_anchor(self, val: Anchor) -> Self
pub fn with_anchor(self, val: Anchor) -> Self
Builder function that sets the Request anchor.
Represents an anchor updating of flags.
Either an integer message ID, or a special string values for when
the client wants the server to compute the anchor to use.
Sourcepub const fn num_before(&self) -> u64
pub const fn num_before(&self) -> u64
Gets the Request num_before.
Limit the number of messages preceding the anchor in the update range.
The server may decrease this to bound transaction sizes.
Sourcepub fn set_num_before(&mut self, val: u64)
pub fn set_num_before(&mut self, val: u64)
Sets the Request num_before.
Limit the number of messages preceding the anchor in the update range.
The server may decrease this to bound transaction sizes.
Sourcepub fn with_num_before(self, val: u64) -> Self
pub fn with_num_before(self, val: u64) -> Self
Builder function that sets the Request num_before.
Limit the number of messages preceding the anchor in the update range.
The server may decrease this to bound transaction sizes.
Sourcepub const fn num_after(&self) -> u64
pub const fn num_after(&self) -> u64
Gets the Request num_after.
Limit the number of messages following the anchor in the update range.
The server may decrease this to bound transaction sizes.
Sourcepub fn set_num_after(&mut self, val: u64)
pub fn set_num_after(&mut self, val: u64)
Sets the Request num_after.
Limit the number of messages following the anchor in the update range.
The server may decrease this to bound transaction sizes.
Sourcepub fn with_num_after(self, val: u64) -> Self
pub fn with_num_after(self, val: u64) -> Self
Builder function that sets the Request num_after.
Limit the number of messages following the anchor in the update range.
The server may decrease this to bound transaction sizes.
Sourcepub fn set_op(&mut self, val: Operation)
pub fn set_op(&mut self, val: Operation)
Sets the Request op.
Whether to add the flag or remove it.
Sourcepub fn with_op(self, val: Operation) -> Self
pub fn with_op(self, val: Operation) -> Self
Builder function that sets the Request op.
Whether to add the flag or remove it.
Sourcepub fn with_flag(self, val: Flag) -> Self
pub fn with_flag(self, val: Flag) -> Self
Builder function that sets the Request flag.
The flag that should be added/removed.
See available flags.
Source§impl Request
impl Request
Sourcepub const fn include_anchor(&self) -> Option<bool>
pub const fn include_anchor(&self) -> Option<bool>
Gets the Request include_anchor.
Whether a message with the specified ID matching the narrow
should be included in the update range.
Sourcepub fn set_include_anchor(&mut self, val: bool)
pub fn set_include_anchor(&mut self, val: bool)
Sets the Request include_anchor.
Whether a message with the specified ID matching the narrow
should be included in the update range.
Sourcepub fn unset_include_anchor(&mut self) -> Option<bool>
pub fn unset_include_anchor(&mut self) -> Option<bool>
Unsets the Request include_anchor.
Whether a message with the specified ID matching the narrow
should be included in the update range.
Sourcepub fn with_include_anchor(self, val: bool) -> Self
pub fn with_include_anchor(self, val: bool) -> Self
Builder function that sets the Request include_anchor.
Whether a message with the specified ID matching the narrow
should be included in the update range.
Source§impl Request
impl Request
Sourcepub fn narrow(&self) -> &[Narrow]
pub fn narrow(&self) -> &[Narrow]
Gets the Request narrow.
The narrow you want update flags within. See how to
Note that, when adding the read flag to messages, clients should
consider including a narrow with the is:unread filter as an
optimization. Including that filter takes advantage of the fact that
the server has a database index for unread messages.
Changes: See changes section
of search/narrow filter documentation.
Sourcepub fn set_narrow<'a, C: Into<Cow<'a, [Narrow]>>>(&mut self, val: C)
pub fn set_narrow<'a, C: Into<Cow<'a, [Narrow]>>>(&mut self, val: C)
Sets the Request narrow.
The narrow you want update flags within. See how to
Note that, when adding the read flag to messages, clients should
consider including a narrow with the is:unread filter as an
optimization. Including that filter takes advantage of the fact that
the server has a database index for unread messages.
Changes: See changes section
of search/narrow filter documentation.
Sourcepub fn with_narrow<'a, C: Into<Cow<'a, [Narrow]>>>(self, val: C) -> Self
pub fn with_narrow<'a, C: Into<Cow<'a, [Narrow]>>>(self, val: C) -> Self
Builder function that sets the Request narrow.
The narrow you want update flags within. See how to
Note that, when adding the read flag to messages, clients should
consider including a narrow with the is:unread filter as an
optimization. Including that filter takes advantage of the fact that
the server has a database index for unread messages.
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.