pub enum EnmaError {
SrcFetchError {
details: ErrorDetails,
},
SrcParseError {
details: ErrorDetails,
},
ParseIntError {
details: ErrorDetails,
},
JsonSerDeError {
details: ErrorDetails,
},
ParsingError {
details: ErrorDetails,
},
MiscError {
details: ErrorDetails,
},
}Expand description
Custom error to generalize different types of errors
Variantsยง
SrcFetchError
represents raw source data fetch error
Fields
ยง
details: ErrorDetailsSrcParseError
represents raw source data parse error
Fields
ยง
details: ErrorDetailsParseIntError
represents integer parsing error
Fields
ยง
details: ErrorDetailsJsonSerDeError
represents json serializing or deserializing error
Fields
ยง
details: ErrorDetailsParsingError
represents any non json parsing errors
Fields
ยง
details: ErrorDetailsMiscError
represents miscellaneous errors
Fields
ยง
details: ErrorDetailsImplementationsยง
Sourceยงimpl EnmaError
impl EnmaError
pub fn src_fetch_error( provider_parser: &'static str, err_msg: Option<String>, status: Option<StatusCode>, ) -> Self
pub fn src_parse_error( provider_parser: &'static str, err_msg: Option<String>, status: Option<StatusCode>, ) -> Self
pub fn parse_int_error( provider_parser: &'static str, err_msg: Option<String>, status: Option<StatusCode>, ) -> Self
pub fn json_serde_error( provider_parser: &'static str, err_msg: Option<String>, status: Option<StatusCode>, ) -> Self
pub fn parsing_error( provider_parser: &'static str, err_msg: Option<String>, status: Option<StatusCode>, ) -> Self
pub fn misc_error( provider_parser: &'static str, err_msg: Option<String>, status: Option<StatusCode>, ) -> Self
Trait Implementationsยง
Sourceยงimpl Error for EnmaError
impl Error for EnmaError
1.30.0 ยท Sourceยงfn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 ยท Sourceยงfn description(&self) -> &str
fn description(&self) -> &str
๐Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementationsยง
impl Freeze for EnmaError
impl RefUnwindSafe for EnmaError
impl Send for EnmaError
impl Sync for EnmaError
impl Unpin for EnmaError
impl UnwindSafe for EnmaError
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more