[−][src]Struct spinoso_random::UrandomError
Error that indicates the system source of cryptographically secure randomness failed to read the requested bytes.
This can occur if the source is unknown or lacks sufficient entropy.
This error is returned by urandom()
. See its documentation for more
details.
This error corresponds to the Ruby RuntimeError
Exception class.
Examples
let err = UrandomError::new(); assert_eq!(err.message(), "failed to get urandom");
Implementations
impl UrandomError
[src]
#[must_use]pub const fn new() -> Self
[src]
Construct a new, default urandom error.
Examples
const ERR: UrandomError = UrandomError::new(); assert_eq!(ERR.message(), "failed to get urandom");
#[must_use]pub const fn message(self) -> &'static str
[src]
Retrieve the exception message associated with this urandom error.
Examples
let err = UrandomError::new(); assert_eq!(err.message(), "failed to get urandom");
Trait Implementations
impl Clone for UrandomError
[src]
fn clone(&self) -> UrandomError
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for UrandomError
[src]
impl Debug for UrandomError
[src]
impl Default for UrandomError
[src]
fn default() -> UrandomError
[src]
impl Display for UrandomError
[src]
impl Eq for UrandomError
[src]
impl Error for UrandomError
[src]
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<UrandomError> for Error
[src]
fn from(err: UrandomError) -> Self
[src]
impl Hash for UrandomError
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for UrandomError
[src]
fn cmp(&self, other: &UrandomError) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<UrandomError> for UrandomError
[src]
fn eq(&self, other: &UrandomError) -> bool
[src]
fn ne(&self, other: &UrandomError) -> bool
[src]
impl PartialOrd<UrandomError> for UrandomError
[src]
fn partial_cmp(&self, other: &UrandomError) -> Option<Ordering>
[src]
fn lt(&self, other: &UrandomError) -> bool
[src]
fn le(&self, other: &UrandomError) -> bool
[src]
fn gt(&self, other: &UrandomError) -> bool
[src]
fn ge(&self, other: &UrandomError) -> bool
[src]
impl StructuralEq for UrandomError
[src]
impl StructuralPartialEq for UrandomError
[src]
Auto Trait Implementations
impl RefUnwindSafe for UrandomError
[src]
impl Send for UrandomError
[src]
impl Sync for UrandomError
[src]
impl Unpin for UrandomError
[src]
impl UnwindSafe for UrandomError
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,