pub enum RandError {
Cuda(CudaError),
PtxGeneration(PtxGenError),
InvalidSize(String),
InvalidSeed(String),
InvalidParameter(String),
UnsupportedDistribution(String),
InternalError(String),
}Expand description
RNG-specific error type.
Every fallible RNG operation returns RandResult<T> which uses this
enum as its error variant.
Variants§
Cuda(CudaError)
A CUDA driver call failed.
PtxGeneration(PtxGenError)
PTX kernel source generation failed.
InvalidSize(String)
The requested output size is invalid (e.g., zero elements, or not a multiple of the engine’s natural output width).
InvalidSeed(String)
The provided seed value is invalid.
InvalidParameter(String)
One or more distribution parameters are invalid.
UnsupportedDistribution(String)
The requested distribution is not supported for this engine or precision combination.
InternalError(String)
An internal error that should not occur under normal operation.
Trait Implementations§
Source§impl Error for RandError
impl Error for RandError
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<PtxGenError> for RandError
impl From<PtxGenError> for RandError
Source§fn from(source: PtxGenError) -> Self
fn from(source: PtxGenError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RandError
impl !RefUnwindSafe for RandError
impl Send for RandError
impl Sync for RandError
impl Unpin for RandError
impl UnsafeUnpin for RandError
impl !UnwindSafe for RandError
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