pub enum UnifiError {
Http(Error),
Api {
status_code: u16,
message: String,
},
Url(ParseError),
Config(String),
}Expand description
Enum representing various errors that can occur in the UniFi client library.
Variants§
Http(Error)
Represents an HTTP error, wrapping the underlying reqwest::Error.
Api
Represents an API error, containing the status code and error message.
Fields
Url(ParseError)
Represents an error when parsing a URL, wrapping the underlying url::ParseError.
Config(String)
Represents a configuration error, containing a descriptive error message.
Trait Implementations§
Source§impl Debug for UnifiError
impl Debug for UnifiError
Source§impl Display for UnifiError
impl Display for UnifiError
Source§impl Error for UnifiError
impl Error for UnifiError
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 UnifiError
impl From<Error> for UnifiError
Source§impl From<ParseError> for UnifiError
impl From<ParseError> for UnifiError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UnifiError
impl !RefUnwindSafe for UnifiError
impl Send for UnifiError
impl Sync for UnifiError
impl Unpin for UnifiError
impl !UnwindSafe for UnifiError
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