pub struct SearchBuilder { /* private fields */ }Expand description
Fluent builder for messages.search (in-chat message search).
Created by Client::search. All setters are chainable; call
fetch to execute.
Implementations§
Source§impl SearchBuilder
impl SearchBuilder
Sourcepub fn filter(self, f: MessagesFilter) -> Self
pub fn filter(self, f: MessagesFilter) -> Self
Apply a MessagesFilter (e.g. photos only, video only, etc.).
Sourcepub fn add_offset(self, off: i32) -> Self
pub fn add_offset(self, off: i32) -> Self
Additional offset for fine-grained pagination.
Sourcepub fn sent_by_self(self) -> Self
pub fn sent_by_self(self) -> Self
Restrict to messages sent by this peer (resolved against the cache). Only return messages sent by the logged-in user.
Sourcepub fn top_msg_id(self, id: i32) -> Self
pub fn top_msg_id(self, id: i32) -> Self
Restrict search to a specific forum topic.
Sourcepub async fn fetch(
self,
client: &Client,
) -> Result<Vec<IncomingMessage>, InvocationError>
pub async fn fetch( self, client: &Client, ) -> Result<Vec<IncomingMessage>, InvocationError>
Execute the search and return matching messages.
Auto Trait Implementations§
impl Freeze for SearchBuilder
impl RefUnwindSafe for SearchBuilder
impl Send for SearchBuilder
impl Sync for SearchBuilder
impl Unpin for SearchBuilder
impl UnsafeUnpin for SearchBuilder
impl UnwindSafe for SearchBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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