pub struct DataConnectError { /* private fields */ }Expand description
Rich failure type returned by Data Connect operations.
Implementations§
Source§impl DataConnectError
impl DataConnectError
Sourcepub fn new(code: DataConnectErrorCode, message: impl Into<String>) -> Self
pub fn new(code: DataConnectErrorCode, message: impl Into<String>) -> Self
Creates a new error with the specified code and message.
Sourcepub fn with_operation_failure(
message: impl Into<String>,
response: DataConnectOperationFailureResponse,
) -> Self
pub fn with_operation_failure( message: impl Into<String>, response: DataConnectOperationFailureResponse, ) -> Self
Creates an error that captures the backend-provided GraphQL payload.
Sourcepub fn code(&self) -> DataConnectErrorCode
pub fn code(&self) -> DataConnectErrorCode
Returns the structured error code.
Sourcepub fn operation_failure(&self) -> Option<&DataConnectOperationFailureResponse>
pub fn operation_failure(&self) -> Option<&DataConnectOperationFailureResponse>
Returns the backend failure payload when the code is PartialError.
Trait Implementations§
Source§impl Clone for DataConnectError
impl Clone for DataConnectError
Source§fn clone(&self) -> DataConnectError
fn clone(&self) -> DataConnectError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataConnectError
impl Debug for DataConnectError
Source§impl<'de> Deserialize<'de> for DataConnectError
impl<'de> Deserialize<'de> for DataConnectError
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 Display for DataConnectError
impl Display for DataConnectError
Source§impl Error for DataConnectError
impl Error for DataConnectError
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
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 DataConnectError
impl RefUnwindSafe for DataConnectError
impl Send for DataConnectError
impl Sync for DataConnectError
impl Unpin for DataConnectError
impl UnwindSafe for DataConnectError
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