pub struct Client { /* private fields */ }
Expand description
Telegram Bot API client
Implementations
sourceimpl Client
impl Client
sourcepub fn proxy(&mut self, url: &str) -> Result<&mut Self, ClientError>
pub fn proxy(&mut self, url: &str) -> Result<&mut Self, ClientError>
Provide the URL of a proxy to use
By default this option is not set and corresponds to CURLOPT_PROXY
sourcepub fn execute<M: Method>(&self, method: &M) -> Result<M::Response, ClientError>where
M::Response: DeserializeOwned,
pub fn execute<M: Method>(&self, method: &M) -> Result<M::Response, ClientError>where
M::Response: DeserializeOwned,
Executes a method
sourcepub fn get_updates(&self) -> UpdatesIter<'_> ⓘ
pub fn get_updates(&self) -> UpdatesIter<'_> ⓘ
Returns an iterator over updates
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more