[−][src]Enum rand_core::ErrorKind
Error kind which can be matched over.
Variants
Feature is not available; not recoverable.
This is the most permanent failure type and implies the error cannot be resolved simply by retrying (e.g. the feature may not exist in this build of the application or on the current platform).
General failure; there may be a chance of recovery on retry.
This is the catch-all kind for errors from known and unknown sources which do not have a more specific kind / handling method.
It is suggested to retry a couple of times or retry later when handling; some error sources may be able to resolve themselves, although this is not likely.
A transient failure which likely can be resolved or worked around.
This error kind exists for a few specific cases where it is known that the error likely can be resolved internally, but is reported anyway.
Not ready yet: recommended to try again a little later.
This error kind implies the generator needs more time or needs some other part of the application to do something else first before it is ready for use; for example this may be used by external generators which require time for initialization.
Implementations
impl ErrorKind
[src]
pub fn should_retry(self) -> bool
[src]
True if this kind of error may resolve itself on retry.
See also should_wait()
.
pub fn should_wait(self) -> bool
[src]
True if we should retry but wait before retrying
This implies should_retry()
is true.
pub fn description(self) -> &'static str
[src]
A description of this error kind
Trait Implementations
impl Clone for ErrorKind
[src]
impl Copy for ErrorKind
[src]
impl Debug for ErrorKind
[src]
impl Eq for ErrorKind
[src]
impl PartialEq<ErrorKind> for ErrorKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnwindSafe for ErrorKind
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,
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.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,