pub enum GarminError {
Show 16 variants
Authentication(String),
NotAuthenticated,
MfaRequired,
RateLimited,
NotFound(String),
Api {
status: u16,
message: String,
},
Http(Error),
InvalidResponse(String),
Json(Error),
Io(Error),
Config(String),
Database(String),
Keyring(String),
InvalidDateFormat(String),
InvalidParameter(String),
Other(String),
}Expand description
Main error type for garmin-cli
Variants§
Authentication(String)
NotAuthenticated
MfaRequired
RateLimited
NotFound(String)
Api
Http(Error)
InvalidResponse(String)
Json(Error)
Io(Error)
Config(String)
Database(String)
Keyring(String)
InvalidDateFormat(String)
InvalidParameter(String)
Other(String)
Implementations§
Source§impl GarminError
impl GarminError
Sourcepub fn invalid_response(msg: impl Into<String>) -> Self
pub fn invalid_response(msg: impl Into<String>) -> Self
Create an invalid response error from a message
Sourcepub fn invalid_param(msg: impl Into<String>) -> Self
pub fn invalid_param(msg: impl Into<String>) -> Self
Create an invalid parameter error from a message
Trait Implementations§
Source§impl Debug for GarminError
impl Debug for GarminError
Source§impl Display for GarminError
impl Display for GarminError
Source§impl Error for GarminError
impl Error for GarminError
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()
Source§impl From<Error> for GarminError
impl From<Error> for GarminError
Source§impl From<Error> for GarminError
impl From<Error> for GarminError
Auto Trait Implementations§
impl Freeze for GarminError
impl !RefUnwindSafe for GarminError
impl Send for GarminError
impl Sync for GarminError
impl Unpin for GarminError
impl UnsafeUnpin for GarminError
impl !UnwindSafe for GarminError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.