pub enum SdkError {
Http(Error),
Json(Error),
Url(ParseError),
Api {
status: i32,
message: String,
},
Authentication(String),
InvalidParameter(String),
UnexpectedResponse(String),
}Expand description
Errors that can occur when using the NLECloud SDK.
Variants§
Http(Error)
An HTTP transport error occurred.
Json(Error)
A JSON serialization or deserialization error occurred.
Url(ParseError)
A URL parsing error occurred.
Api
The API responded with a logical failure status in its ResultMsg envelope.
Fields
Authentication(String)
An authentication token is missing or invalid.
InvalidParameter(String)
An invalid parameter was supplied.
UnexpectedResponse(String)
The API response format was unexpected or could not be parsed.
Trait Implementations§
Source§impl Error for SdkError
impl Error for SdkError
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<ParseError> for SdkError
impl From<ParseError> for SdkError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for SdkError
impl !UnwindSafe for SdkError
impl Forget for SdkError
impl Freeze for SdkError
impl Move for SdkError
impl Send for SdkError
impl Sync for SdkError
impl Unpin for SdkError
impl UnsafeUnpin for SdkError
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