pub struct SdkError {
pub code: i64,
pub data: Option<Value>,
pub message: String,
}
Fields§
§code: i64
The error type that occurred.
data: Option<Value>
Additional information about the error.
message: String
A short description of the error.
Implementations§
Source§impl SdkError
impl SdkError
pub fn new( error_code: SdkErrorCodes, message: String, data: Option<Value>, ) -> Self
pub fn connection_closed() -> Self
pub fn request_timeout(timeout: u128) -> Self
pub fn session_not_found() -> Self
pub fn invalid_request() -> Self
pub fn method_not_found() -> Self
pub fn invalid_params() -> Self
pub fn internal_error() -> Self
pub fn parse_error() -> Self
pub fn resource_not_found() -> Self
pub fn bad_request() -> Self
pub fn with_message(self, message: &str) -> Self
pub fn with_data(self, data: Option<Value>) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SdkError
impl<'de> Deserialize<'de> for SdkError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for SdkError
impl Error for SdkError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · 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
Auto Trait Implementations§
impl Freeze for SdkError
impl RefUnwindSafe for SdkError
impl Send for SdkError
impl Sync for SdkError
impl Unpin for SdkError
impl UnwindSafe 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