1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use tokio_curl::PerformError; #[derive(Debug)] pub enum Error { // indicates that the received reply couldn't be decoded (e.g. caused by an aborted // connection) UTF8Decode, // indicates a Telegram error (e.g. a property is missing) Telegram(String), // indicates some failure in CURL, missing network connection etc. TokioCurl(PerformError), // indicates a malformated reply, this should never happen unless the Telegram server has a // hard time JSON, // indicates an unknown error Unknown }