pub struct TabularkError { /* private fields */ }Expand description
A serializable error with a stable code and optional structured details.
Implementations§
Source§impl TabularkError
impl TabularkError
Sourcepub fn new(code: ErrorCode, message: impl Into<String>) -> Self
pub fn new(code: ErrorCode, message: impl Into<String>) -> Self
Creates a new non-retryable error without implementation details.
Sourcepub const fn with_retryable(self, retryable: bool) -> Self
pub const fn with_retryable(self, retryable: bool) -> Self
Marks this error as safe to retry after external state changes.
Sourcepub fn with_detail(
self,
key: impl Into<String>,
value: impl Into<Value>,
) -> Self
pub fn with_detail( self, key: impl Into<String>, value: impl Into<Value>, ) -> Self
Adds a JSON-compatible detail value.
Trait Implementations§
Source§impl Clone for TabularkError
impl Clone for TabularkError
Source§impl Debug for TabularkError
impl Debug for TabularkError
Source§impl<'de> Deserialize<'de> for TabularkError
impl<'de> Deserialize<'de> for TabularkError
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 TabularkError
impl Display for TabularkError
impl Eq for TabularkError
Source§impl Error for TabularkError
impl Error for TabularkError
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()
Source§impl PartialEq for TabularkError
impl PartialEq for TabularkError
Source§impl Serialize for TabularkError
impl Serialize for TabularkError
impl StructuralPartialEq for TabularkError
Auto Trait Implementations§
impl Freeze for TabularkError
impl RefUnwindSafe for TabularkError
impl Send for TabularkError
impl Sync for TabularkError
impl Unpin for TabularkError
impl UnsafeUnpin for TabularkError
impl UnwindSafe for TabularkError
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