Enum teloxide_core::errors::DownloadError
source · [−]Expand description
An error caused by downloading a file.
Variants
Network(Error)
A network error while downloading a file from Telegram.
Io(Error)
An I/O error while writing a file to destination.
Trait Implementations
sourceimpl Debug for DownloadError
impl Debug for DownloadError
sourceimpl Display for DownloadError
impl Display for DownloadError
sourceimpl Error for DownloadError
impl Error for DownloadError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<DownloadError> for RequestError
impl From<DownloadError> for RequestError
This impl allows to use ? to propagate DownloadErrors in function
returning RequestErrors. For example:
async fn handler() -> Result<(), RequestError> {
download_file().await?; // `?` just works
Ok(())
}
async fn download_file() -> Result<(), DownloadError> {
/* download file here */
Ok(())
}sourcefn from(download_err: DownloadError) -> Self
fn from(download_err: DownloadError) -> Self
Converts to this type from the input type.
sourceimpl From<Error> for DownloadError
impl From<Error> for DownloadError
Auto Trait Implementations
impl !RefUnwindSafe for DownloadError
impl Send for DownloadError
impl Sync for DownloadError
impl Unpin for DownloadError
impl !UnwindSafe for DownloadError
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
