From 369d11587339ce74f8ebc76f2607fe55545eaf7d Mon Sep 17 00:00:00 2001 From: garhve Date: Tue, 20 Dec 2022 11:04:25 +0800 Subject: Build small project following the book --- .../target/doc/getrandom/struct.Error.html | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html (limited to 'rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html') diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html new file mode 100644 index 0000000..d0f8c77 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/struct.Error.html @@ -0,0 +1,47 @@ +Error in getrandom - Rust
pub struct Error(_);
Expand description

A small and no_std compatible error type

+

The Error::raw_os_error() will indicate if the error is from the OS, and +if so, which error code the OS gave the application. If such an error is +encountered, please consult with your system documentation.

+

Internally this type is a NonZeroU32, with certain values reserved for +certain purposes, see Error::INTERNAL_START and Error::CUSTOM_START.

+

If this crate’s "std" Cargo feature is enabled, then:

+ +

Implementations

This target/platform is not supported by getrandom.

+

The platform-specific errno returned a non-positive value.

+

Call to iOS SecRandomCopyBytes failed.

+

Call to Windows RtlGenRandom failed.

+

RDRAND instruction failed due to a hardware issue.

+

RDRAND instruction unsupported on this target.

+

The environment does not support the Web Crypto API.

+

Calling Web Crypto API crypto.getRandomValues failed.

+

On VxWorks, call to randSecure failed (random number generator is not yet initialized).

+

Node.js does not have the crypto CommonJS module.

+

Calling Node.js function crypto.randomFillSync failed.

+

Called from an ES module on Node.js. This is unsupported, see: +https://docs.rs/getrandom#nodejs-es-module-support.

+

Codes below this point represent OS Errors (i.e. positive i32 values). +Codes at or above this point, but below Error::CUSTOM_START are +reserved for use by the rand and getrandom crates.

+

Codes at or above this point can be used by users to define their own +custom errors.

+

Extract the raw OS error code (if this error came from the OS)

+

This method is identical to std::io::Error::raw_os_error(), except +that it works in no_std contexts. If this method returns None, the +error value can still be formatted via the Display implementation.

+

Extract the bare error code.

+

This code can either come from the underlying OS, or be a custom error. +Use Error::raw_os_error() to disambiguate.

+

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The lower-level source of this error, if any. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used +by ==. Read more
This method tests for !=. The default implementation is almost always +sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

+

Calls U::from(self).

+

That is, this conversion is whatever the implementation of +From<T> for U chooses to do.

+
🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to +provide by using demand. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
\ No newline at end of file -- cgit v1.2.3-70-g09d2