pub struct Error { /* private fields */ }Expand description
A cudf error. See the module-level docs for the contract.
Implementations§
Source§impl Error
impl Error
Sourcepub fn status(&self) -> ErrorStatus
pub fn status(&self) -> ErrorStatus
The retry semantic (pure projection of code).
Sourcepub fn fact_value(&self, key: FactKeyName) -> Option<&FactValue>
pub fn fact_value(&self, key: FactKeyName) -> Option<&FactValue>
The value of a canonical fact, if present.
Sourcepub fn details(&self) -> &[(&'static str, String)]
pub fn details(&self) -> &[(&'static str, String)]
Open-ended diagnostic annotations (may contain repeated keys).
Sourcepub fn detail_value(&self, key: &str) -> Option<&str>
pub fn detail_value(&self, key: &str) -> Option<&str>
The first detail value recorded for key, if any.
Sourcepub fn detail_values<'a>(
&'a self,
key: &'a str,
) -> impl Iterator<Item = &'a str> + 'a
pub fn detail_values<'a>( &'a self, key: &'a str, ) -> impl Iterator<Item = &'a str> + 'a
All detail values recorded for key, in insertion order.
Sourcepub fn budget_exhaustion(&self) -> Option<&BudgetExhaustionDetail>
pub fn budget_exhaustion(&self) -> Option<&BudgetExhaustionDetail>
Typed budget-exhaustion counters attached by a hard budget token.
Sourcepub fn ffi_detail(&self) -> Option<&CudfErrorDetail>
pub fn ffi_detail(&self) -> Option<&CudfErrorDetail>
The native shim payload copied at the failed FFI boundary, if present.
Sourcepub fn call_chain(&self) -> &[&'static str]
pub fn call_chain(&self) -> &[&'static str]
Ordered trail of prior primary operations this error has been re-anchored from. No deduplication.
Sourcepub fn source_error(&self) -> Option<&(dyn StdError + 'static)>
pub fn source_error(&self) -> Option<&(dyn StdError + 'static)>
Underlying error cause, if any.
Sourcepub fn diagnostic_string(&self) -> String
pub fn diagnostic_string(&self) -> String
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Equivalent to status() == Temporary.
Sourcepub fn is_temporary(&self) -> bool
pub fn is_temporary(&self) -> bool
Equivalent to status() == Temporary.
Sourcepub fn is_permanent(&self) -> bool
pub fn is_permanent(&self) -> bool
Equivalent to status() == Permanent.
Sourcepub fn is_persistent(&self) -> bool
pub fn is_persistent(&self) -> bool
Equivalent to status() == Persistent.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()