Registry / utility / core-error

core-error

JSON →
library0.0.0rscratesunverified

Provides std::error::Error trait for no_std environments (libcore).

# Cargo.toml [dependencies] core-error = "0.0.0"
INSTALL
IMPORT
SIG · CORE-ERROR
C
core-error
utilityrustv0.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Error
use core_error::Error;

Implement the Error trait for a custom type in a no_std environment.

#![no_std] use core_error::Error; #[derive(Debug, Clone)] struct MyError; impl core::fmt::Display for MyError { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { write!(f, "my error") } } impl Error for MyError {} fn main() { let e = MyError; // Use e as an error }
Debug
Known issues
gotchaVersion 0.0.0 is a placeholder; may not be stable.
fix
Check for newer versions or use std::error::Error if std is available.
affects: 0.0.0
Upgrade
Version history
0.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
core-error — cargo add core-error · libregistry