#[non_exhaustive]pub enum CoreError {
Auth,
Network,
Protocol(String),
NotFound,
Conflict,
Forbidden,
RateLimited {
retry_after: Option<Duration>,
},
Unsupported(&'static str),
HostNotAllowed,
InvalidInput(String),
}Expand description
Failure from a mail, calendar, reminders or contacts provider.
[Display] never includes protocol detail. Callers must not put a secret in
any variant. CoreError::protocol_detail is the only way to read a protocol
string, and it is for diagnostics after the caller has checked it is safe.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auth
The service rejected the credentials.
Network
The network failed before a protocol result arrived.
Protocol(String)
A protocol failure. The string is not part of [Display].
NotFound
The mailbox, message or resource does not exist.
Conflict
A conditional write lost a race with another client.
Forbidden
The service refused a change the signed-in account may not make.
For example a write to a read-only shared calendar. The password was accepted, so
this is not CoreError::Auth.
RateLimited
The service asked us to slow down.
Unsupported(&'static str)
The service cannot do this operation.
HostNotAllowed
The host is not on the iCloud allowlist.
InvalidInput(String)
A tool or caller passed a value the provider cannot use.
The string is a safe message for the user, never a secret or raw server text.
Implementations§
Source§impl CoreError
impl CoreError
Sourcepub fn protocol_detail(&self) -> Option<&str>
pub fn protocol_detail(&self) -> Option<&str>
Protocol detail, when this is CoreError::Protocol.
This is not included in [Display].
Trait Implementations§
impl Eq for CoreError
Source§impl Error for CoreError
impl Error for CoreError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()