#[non_exhaustive]pub struct MessageQueryInput<'a> {
pub chat_id: Option<&'a Id>,
pub has_mention: Option<bool>,
pub has_attachment: Option<bool>,
pub text: Option<&'a str>,
pub thread_root_id: Option<&'a Id>,
pub after: Option<&'a UTCDate>,
pub before: Option<&'a UTCDate>,
pub position: Option<u64>,
pub limit: Option<u64>,
pub sort_ascending: bool,
}Expand description
Input parameters for Message/query.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.chat_id: Option<&'a Id>Restrict to messages in a specific Chat.
has_mention: Option<bool>Filter to messages that mention (true) or do not mention (false) the caller.
has_attachment: Option<bool>Filter to messages that carry (true) or do not carry (false) attachments.
text: Option<&'a str>Full-text search query against the message body.
thread_root_id: Option<&'a Id>Restrict to replies under this thread root.
after: Option<&'a UTCDate>Only include messages received after this time (exclusive).
before: Option<&'a UTCDate>Only include messages received before this time (exclusive).
position: Option<u64>Zero-based starting offset within the query result.
limit: Option<u64>Maximum number of ids to return.
sort_ascending: boolSort by sentAt ascending (oldest first) when true.
Defaults to false (descending, newest first), so position:0, limit:N
returns the N most recent messages.
Implementations§
Source§impl<'a> MessageQueryInput<'a>
impl<'a> MessageQueryInput<'a>
Sourcepub fn with_sort_ascending(self, v: bool) -> Self
pub fn with_sort_ascending(self, v: bool) -> Self
Set ascending sort order (oldest first).
Trait Implementations§
Source§impl<'a> Debug for MessageQueryInput<'a>
impl<'a> Debug for MessageQueryInput<'a>
Source§impl<'a> Default for MessageQueryInput<'a>
impl<'a> Default for MessageQueryInput<'a>
Source§fn default() -> MessageQueryInput<'a>
fn default() -> MessageQueryInput<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for MessageQueryInput<'a>
impl<'a> RefUnwindSafe for MessageQueryInput<'a>
impl<'a> Send for MessageQueryInput<'a>
impl<'a> Sync for MessageQueryInput<'a>
impl<'a> Unpin for MessageQueryInput<'a>
impl<'a> UnsafeUnpin for MessageQueryInput<'a>
impl<'a> UnwindSafe for MessageQueryInput<'a>
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
Mutably borrows from an owned value. Read more