cex

Crates.iocex
lib.rscex
version0.5.2
sourcesrc
created_at2018-11-20 17:41:24.697635
updated_at2021-04-04 11:51:25.677188
descriptionChecked exception simulation.
homepage
repositoryhttps://github.com/oooutlk/enumx
max_upload_size
id97803
size35,830
(oooutlk)

documentation

https://docs.rs/cex

README

Motivation

Emulating checked exceptions in Rust.

Usage

  1. Add this crate to Cargo.toml, and enable any features you want

Cargo.toml:

[dependencies.enumx]
version = "0.4"

[dependencies.cex]
version = "0.5"

Add this if you want to support backtrace:

features = ["log","pretty_log"]

src/lib.rs:

use enumx::export::*;
use enumx::predefined::*; // or use your own enum types at your will.
use cex::*;

Features

  1. ad-hoc enums as checked exceptions.

  2. Backtrace.

  3. Type as pattern.

  4. Fallback as impl Trait.

Documentation

See the enumx book for more.

License

Under MIT.

Commit count: 19

cargo fmt