pub struct GetUpdates { /* private fields */ }Expand description
Builder for the getUpdates method.
Implementations§
Source§impl GetUpdates
impl GetUpdates
Sourcepub fn offset(self, offset: i64) -> Self
pub fn offset(self, offset: i64) -> Self
Sets the update offset — all updates with update_id < offset are
acknowledged and will not be returned again.
Sourcepub fn limit(self, limit: u8) -> Self
pub fn limit(self, limit: u8) -> Self
Limits the number of updates returned (1–100, default 100).
Sourcepub fn timeout(self, secs: u32) -> Self
pub fn timeout(self, secs: u32) -> Self
Sets the long-poll server-side timeout in seconds. Use 0 for short polling.
Sourcepub fn allowed_updates(self, types: Vec<impl Into<String>>) -> Self
pub fn allowed_updates(self, types: Vec<impl Into<String>>) -> Self
Restricts which update types are returned (e.g. ["message", "callback_query"]).
Trait Implementations§
Source§impl IntoFuture for GetUpdates
impl IntoFuture for GetUpdates
Source§type Output = Result<Vec<Update>, Error>
type Output = Result<Vec<Update>, Error>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <GetUpdates as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <GetUpdates as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for GetUpdates
impl !UnwindSafe for GetUpdates
impl Freeze for GetUpdates
impl Send for GetUpdates
impl Sync for GetUpdates
impl Unpin for GetUpdates
impl UnsafeUnpin for GetUpdates
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