Skip to main content

Error

Struct Error 

Source
pub struct Error { /* private fields */ }
Expand description

A cudf error. See the module-level docs for the contract.

Implementations§

Source§

impl Error

Source

pub fn code(&self) -> ErrorCode

The stable machine-readable failure identity.

Source

pub fn kind(&self) -> ErrorKind

The coarse failure category (pure projection of code).

Source

pub fn status(&self) -> ErrorStatus

The retry semantic (pure projection of code).

Source

pub fn operation(&self) -> &'static str

The cudf boundary at which this error was surfaced.

Source

pub fn message(&self) -> &str

The one-line primary failure description.

Source

pub fn facts(&self) -> &Facts

Canonical typed facts.

Source

pub fn fact_value(&self, key: FactKeyName) -> Option<&FactValue>

The value of a canonical fact, if present.

Source

pub fn details(&self) -> &[(&'static str, String)]

Open-ended diagnostic annotations (may contain repeated keys).

Source

pub fn detail_value(&self, key: &str) -> Option<&str>

The first detail value recorded for key, if any.

Source

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.

Source

pub fn budget_exhaustion(&self) -> Option<&BudgetExhaustionDetail>

Typed budget-exhaustion counters attached by a hard budget token.

Source

pub fn ffi_detail(&self) -> Option<&CudfErrorDetail>

The native shim payload copied at the failed FFI boundary, if present.

Source

pub fn call_chain(&self) -> &[&'static str]

Ordered trail of prior primary operations this error has been re-anchored from. No deduplication.

Source

pub fn source_error(&self) -> Option<&(dyn StdError + 'static)>

Underlying error cause, if any.

Source

pub fn diagnostic_string(&self) -> String

Stable diagnostic string for logs and query-engine adapters.

This formats the existing error contract without introducing parallel stored kind/status fields or string-only categories. Callers that need policy decisions should keep using code, kind, status, and facts directly.

Source

pub fn is_retryable(&self) -> bool

Equivalent to status() == Temporary.

Source

pub fn is_temporary(&self) -> bool

Equivalent to status() == Temporary.

Source

pub fn is_permanent(&self) -> bool

Equivalent to status() == Permanent.

Source

pub fn is_persistent(&self) -> bool

Equivalent to status() == Persistent.

Source

pub fn is_oom(&self) -> bool

Equivalent to code() == ErrorCode::OutOfMemory.

This is the single domestic OOM leaf. Foreign resource exhaustion is a different leaf and does not alias here.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn StdError + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for DeviceMemoryManagerInstallationError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.