pub struct NodeDbError { /* private fields */ }Expand description
Public error type returned by all NodeDb trait methods.
Separates machine-readable data (ErrorCode + ErrorDetails) from
the human-readable message. Optional cause preserves the error chain.
Implementations§
Source§impl NodeDbError
impl NodeDbError
Sourcepub fn details(&self) -> &ErrorDetails
pub fn details(&self) -> &ErrorDetails
Machine-matchable error details.
Sourcepub fn cause(&self) -> Option<&NodeDbError>
pub fn cause(&self) -> Option<&NodeDbError>
The chained cause, if any.
Sourcepub fn with_cause(self, cause: NodeDbError) -> Self
pub fn with_cause(self, cause: NodeDbError) -> Self
Attach a cause to this error.
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Whether this error is retriable by the client.
Sourcepub fn is_client_error(&self) -> bool
pub fn is_client_error(&self) -> bool
Whether this error indicates the client sent invalid input.
Source§impl NodeDbError
impl NodeDbError
pub fn is_constraint_violation(&self) -> bool
pub fn is_not_found(&self) -> bool
pub fn is_auth_denied(&self) -> bool
pub fn is_storage(&self) -> bool
pub fn is_internal(&self) -> bool
pub fn is_type_mismatch(&self) -> bool
pub fn is_type_guard_violation(&self) -> bool
pub fn is_overflow(&self) -> bool
pub fn is_insufficient_balance(&self) -> bool
pub fn is_rate_exceeded(&self) -> bool
pub fn is_cluster(&self) -> bool
Source§impl NodeDbError
impl NodeDbError
pub fn constraint_violation( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn write_conflict( collection: impl Into<String>, document_id: impl Into<String>, ) -> Self
pub fn deadline_exceeded() -> Self
pub fn prevalidation_rejected( constraint: impl Into<String>, reason: impl Display, ) -> Self
pub fn append_only_violation( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn balance_violation( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn period_locked( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn state_transition_violation( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn transition_check_violation( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn type_guard_violation( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn retention_violation( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn legal_hold_active( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn type_mismatch( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn overflow(collection: impl Into<String>, detail: impl Display) -> Self
pub fn insufficient_balance( collection: impl Into<String>, detail: impl Display, ) -> Self
pub fn rate_exceeded(gate: impl Into<String>, detail: impl Display) -> Self
pub fn collection_not_found(collection: impl Into<String>) -> Self
pub fn document_not_found( collection: impl Into<String>, document_id: impl Into<String>, ) -> Self
pub fn plan_error(detail: impl Display) -> Self
pub fn fan_out_exceeded(shards_touched: u16, limit: u16) -> Self
pub fn sql_not_enabled() -> Self
pub fn auth_expired(detail: impl Display) -> Self
pub fn sync_connection_failed(detail: impl Display) -> Self
pub fn sync_delta_rejected( reason: impl Display, compensation: Option<CompensationHint>, ) -> Self
pub fn shape_subscription_failed( shape_id: impl Into<String>, detail: impl Display, ) -> Self
pub fn storage(detail: impl Display) -> Self
pub fn segment_corrupted(detail: impl Display) -> Self
pub fn cold_storage(detail: impl Display) -> Self
pub fn wal(detail: impl Display) -> Self
pub fn serialization(format: impl Into<String>, detail: impl Display) -> Self
pub fn codec(detail: impl Display) -> Self
pub fn config(detail: impl Display) -> Self
pub fn bad_request(detail: impl Display) -> Self
pub fn no_leader(detail: impl Display) -> Self
pub fn not_leader(leader_addr: impl Into<String>) -> Self
pub fn migration_in_progress(detail: impl Display) -> Self
pub fn node_unreachable(detail: impl Display) -> Self
pub fn cluster(detail: impl Display) -> Self
pub fn memory_exhausted(engine: impl Into<String>) -> Self
pub fn encryption(detail: impl Display) -> Self
pub fn bridge(detail: impl Display) -> Self
pub fn dispatch(detail: impl Display) -> Self
pub fn internal(detail: impl Display) -> Self
Trait Implementations§
Source§impl Clone for NodeDbError
impl Clone for NodeDbError
Source§fn clone(&self) -> NodeDbError
fn clone(&self) -> NodeDbError
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 NodeDbError
impl Debug for NodeDbError
Source§impl<'de> Deserialize<'de> for NodeDbError
impl<'de> Deserialize<'de> for NodeDbError
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 NodeDbError
impl Display for NodeDbError
Source§impl Error for NodeDbError
impl Error for NodeDbError
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 NodeDbError
impl From<Error> for NodeDbError
Auto Trait Implementations§
impl Freeze for NodeDbError
impl RefUnwindSafe for NodeDbError
impl Send for NodeDbError
impl Sync for NodeDbError
impl Unpin for NodeDbError
impl UnsafeUnpin for NodeDbError
impl UnwindSafe for NodeDbError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.