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 Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Error for Error[src]
impl Error for Errorfn description(&self) -> &str[src]
fn description(&self) -> &strThis 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 Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl From<Error> for Error[src]
impl From<Error> for Errorimpl From<Error> for Error[src]
impl From<Error> for Errorimpl From<DecoderError> for Error[src]
impl From<DecoderError> for Errorfn from(e: DecoderError) -> Self[src]
fn from(e: DecoderError) -> SelfPerforms the conversion.
impl From<EncoderError> for Error[src]
impl From<EncoderError> for Errorfn from(e: EncoderError) -> Self[src]
fn from(e: EncoderError) -> SelfPerforms the conversion.
impl From<ParseError> for Error[src]
impl From<ParseError> for Errorfn from(e: ParseError) -> Self[src]
fn from(e: ParseError) -> SelfPerforms the conversion.
impl From<VarError> for Error[src]
impl From<VarError> for Error