Status

Trait Status 

Source
pub trait Status: Copy + PartialEq {
    const SUCCESS: Self;

    // Required method
    fn as_string(&self) -> &'static str;

    // Provided methods
    fn is_success(&self) -> bool { ... }
    fn unwrap(&self) { ... }
    fn unwrap_in_drop(&self) { ... }
}

Required Associated Constants§

Source

const SUCCESS: Self

Required Methods§

Source

fn as_string(&self) -> &'static str

Provided Methods§

Source

fn is_success(&self) -> bool

Source

fn unwrap(&self)

Source

fn unwrap_in_drop(&self)

Alternative to unwrap that only panics if !std::thread::panicking(). This is useful to avoid double panics in Drop implementations.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Status for cublasStatus_t

Source§

const SUCCESS: Self = cublasStatus_t::CUBLAS_STATUS_SUCCESS

Source§

impl Status for cudaError

Source§

const SUCCESS: Self = cudaError::cudaSuccess

Source§

impl Status for CUresult

Source§

const SUCCESS: Self = CUresult::CUDA_SUCCESS

Source§

impl Status for cudnnStatus_t

Source§

const SUCCESS: Self = cudnnStatus_t::CUDNN_STATUS_SUCCESS

Source§

impl Status for nvrtcResult

Source§

const SUCCESS: Self = nvrtcResult::NVRTC_SUCCESS