Enum telegram_bot::Error [−][src]
pub enum Error { Http(Error), Io(Error), JsonDecode(DecoderError), JsonEncode(EncoderError), Api(String), InvalidState(String), InvalidTokenFormat(ParseError), InvalidEnvironmentVar(VarError), InvalidPath(String), }
Telegram-Bot Error: Anything that may fail (HTTP, JSON, ...)
Variants
Http(Error)
HTTP related error
Io(Error)
IO related error (mainly reading the http result)
JsonDecode(DecoderError)
Error while decoding JSON data
JsonEncode(EncoderError)
Error while encoding JSON data
Api(String)
Telegram server reponsded with an error + description
InvalidState(String)
This should never happen (it possibly could if the telegram servers would respond with garbage)
InvalidTokenFormat(ParseError)
Occurs, if the given bot token would not result in a valid request URL.
InvalidEnvironmentVar(VarError)
The given environment variable could not be fetched.
InvalidPath(String)
The given path is not valid.
Trait Implementations
impl Debug for Error
[src]
impl Debug for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Error for Error
[src]
impl Error for Error
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
1.0.0[src]
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl Display for Error
[src]
impl Display for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<Error> for Error
[src]
impl From<Error> for Error
impl From<Error> for Error
[src]
impl From<Error> for Error
impl From<DecoderError> for Error
[src]
impl From<DecoderError> for Error
fn from(e: DecoderError) -> Self
[src]
fn from(e: DecoderError) -> Self
Performs the conversion.
impl From<EncoderError> for Error
[src]
impl From<EncoderError> for Error
fn from(e: EncoderError) -> Self
[src]
fn from(e: EncoderError) -> Self
Performs the conversion.
impl From<ParseError> for Error
[src]
impl From<ParseError> for Error
fn from(e: ParseError) -> Self
[src]
fn from(e: ParseError) -> Self
Performs the conversion.
impl From<VarError> for Error
[src]
impl From<VarError> for Error