Docs.rs
  • error-code-3.3.2
    • error-code 3.3.2
    • Permalink
    • Docs.rs crate page
    • BSL-1.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • DoumanAsh
    • Dependencies
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate error_code

error_code3.3.2

  • All Items

Sections

  • Usage

Crate Items

  • Modules
  • Macros
  • Structs
  • Constants
  • Statics
  • Type Aliases

Crates

  • error_code

Crate error_code

Source
Expand description

Error code library provides generic errno/winapi error wrapper

User can define own Category if you want to create new error wrapper.

§Usage

use error_code::ErrorCode;

use std::fs::File;

File::open("non_existing");
println!("{}", ErrorCode::last_system());

Modules§

defs
Definitions used by this library
types
C types used inside crate
utils
Error code utilities

Macros§

define_category
Defines error code Category as enum which implements conversion into generic ErrorCode

Structs§

Category
Interface for error category
ErrorCode
Describes error code of particular category.

Constants§

FAIL_ERROR_FORMAT
Text to return when error fails to be converted into utf-8
MESSAGE_BUF_SIZE
Error message buffer size
UNKNOWN_ERRORDeprecated
Text to return when cannot map error

Statics§

POSIX_CATEGORY
Posix error category, suitable for all environments.
SYSTEM_CATEGORY
System error category, suitable for all environments.

Type Aliases§

MessageBuf
Type alias for buffer to hold error code description.

Results

Settings
Help
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.