pub enum GetMyIdError {
ConnectionFailed {
path: PathBuf,
source: Error,
},
ReadError(Error),
WriteError(Error),
InvalidJson(Error),
DaemonError {
code: String,
message: String,
},
MissingField {
field: &'static str,
},
SocketNotFound(PathBuf),
Timeout(Duration),
}Expand description
Errors that can occur when communicating with the whoami daemon.
Variants§
ConnectionFailed
Failed to connect to the Unix Domain Socket.
ReadError(Error)
Failed to read response from the daemon.
WriteError(Error)
Failed to write to the daemon.
InvalidJson(Error)
Response is not valid JSON.
DaemonError
Daemon returned an error response.
Fields
MissingField
Response is missing required fields.
SocketNotFound(PathBuf)
Socket path does not exist.
Timeout(Duration)
Connection timeout.
Trait Implementations§
Source§impl Debug for GetMyIdError
impl Debug for GetMyIdError
Source§impl Display for GetMyIdError
impl Display for GetMyIdError
Source§impl Error for GetMyIdError
impl Error for GetMyIdError
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 GetMyIdError
impl !RefUnwindSafe for GetMyIdError
impl Send for GetMyIdError
impl Sync for GetMyIdError
impl Unpin for GetMyIdError
impl !UnwindSafe for GetMyIdError
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