pub struct GlobalSearchBuilder { /* private fields */ }Expand description
Fluent builder for messages.searchGlobal (cross-chat search).
Created by Client::search_global_builder. All setters are chainable;
call fetch to execute.
Implementations§
Source§impl GlobalSearchBuilder
impl GlobalSearchBuilder
Sourcepub fn broadcasts_only(self, v: bool) -> Self
pub fn broadcasts_only(self, v: bool) -> Self
Only return results from broadcast channels.
Sourcepub fn groups_only(self, v: bool) -> Self
pub fn groups_only(self, v: bool) -> Self
Only return results from groups/supergroups.
Sourcepub fn users_only(self, v: bool) -> Self
pub fn users_only(self, v: bool) -> Self
Only return results from private chats / bots.
Sourcepub fn filter(self, f: MessagesFilter) -> Self
pub fn filter(self, f: MessagesFilter) -> Self
Apply a MessagesFilter (e.g. photos, video, etc.).
Sourcepub fn offset_rate(self, r: i32) -> Self
pub fn offset_rate(self, r: i32) -> Self
Pagination: rate from the previous response’s last message.
Sourcepub async fn fetch(
self,
client: &Client,
) -> Result<Vec<IncomingMessage>, InvocationError>
pub async fn fetch( self, client: &Client, ) -> Result<Vec<IncomingMessage>, InvocationError>
Execute the global search and return matching messages.
Auto Trait Implementations§
impl Freeze for GlobalSearchBuilder
impl RefUnwindSafe for GlobalSearchBuilder
impl Send for GlobalSearchBuilder
impl Sync for GlobalSearchBuilder
impl Unpin for GlobalSearchBuilder
impl UnsafeUnpin for GlobalSearchBuilder
impl UnwindSafe for GlobalSearchBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more