# [−][src]Enum rand_core::ErrorKind

    pub enum ErrorKind {
        Unavailable,
        Unexpected,
        Transient,
        NotReady,
        // some variants omitted
    }

Error kind which can be matched over.

## Variants

`Unavailable`

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).

`Unexpected`

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.

`Transient`

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.

`NotReady`

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.

## Methods

### `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 Debug for ErrorKind`[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result<(), Error>`[src]

Formats the value using the given formatter. Read more

### `impl Clone for ErrorKind`[src]

#### `fn clone(&self) -> ErrorKind`[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`1.0.0[src]

Performs copy-assignment from `source`. Read more

### `impl Eq for ErrorKind`[src]

### `impl Copy for ErrorKind`[src]

### `impl PartialEq<ErrorKind> for ErrorKind`[src]

#### `fn eq(&self, other: &ErrorKind) -> bool`[src]

This method tests for `self` and `other` values to be equal, and is used by `==`. Read more

#### `#[must_use] fn ne(&self, other: &Rhs) -> bool` 1.0.0[src]

This method tests for `!=`.

## Auto Trait Implementations

### `impl Unpin for ErrorKind`

### `impl Send for ErrorKind`

### `impl Sync for ErrorKind`

### `impl UnwindSafe for ErrorKind`

### `impl RefUnwindSafe for ErrorKind`

## Blanket Implementations

### `impl<T> From<T> for T`[src]

#### `fn from(t: T) -> T`[src]

Performs the conversion.

### `impl<T, U> TryFrom<U> for T where
U: Into<T>,` [src]

#### `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]

Performs the conversion.

### `impl<T, U> Into<U> for T where
U: From<T>,` [src]

#### `fn into(self) -> U`[src]

Performs the conversion.

### `impl<T, U> TryInto<U> for T where
U: TryFrom<T>,` [src]

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

The type returned in the event of a conversion error.

#### `fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`[src]

Performs the conversion.

### `impl<T> Borrow<T> for T where
T: ?Sized,` [src]

#### `fn borrow(&self) -> &T`[src]

Immutably borrows from an owned value. Read more

### `impl<T> BorrowMut<T> for T where
T: ?Sized,` [src]

#### `fn borrow_mut(&mut self) -> &mut T`[src]

Mutably borrows from an owned value. Read more

### `impl<T> Any for T where
T: 'static + ?Sized,` [src]

#### `fn type_id(&self) -> TypeId`[src]

Gets the `TypeId` of `self`. Read more

### `impl<T> ToOwned for T where
T: Clone,` [src]

#### `type Owned = T`

The resulting type after obtaining ownership.

#### `fn to_owned(&self) -> T`[src]

Creates owned data from borrowed data, usually by cloning. Read more

#### `fn clone_into(&self, target: &mut T)`[src]

🔬 This is a nightly-only experimental API. (`toowned_clone_into`)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)