tc-error

Crates.iotc-error
lib.rstc-error
created_at2021-02-21 00:58:44.741054
updated_at2024-01-29 12:28:11.806167
descriptionTinyChain's generic error struct
homepage
repositoryhttps://github.com/haydnv/tinychain.git
max_upload_size
id358267
Haydn Vestal

documentation

README

This crate is used internally by TinyChain. It provides a generic error type `TCError` which can be mapped to common HTTP error codes and supports serialization and deserialization with `destream`. Example: ```rust use tc_error::*; fn expect_true(value: bool) -> TCResult<()> { if value { Ok(()) } else { Err(TCError::bad_request("expected true but found", value)) } } assert_eq!(expect_true(true), Ok(())); ``` For more information on TinyChain, see: [http://github.com/haydnv/tinychain](http://github.com/haydnv/tinychain)
Commit count: 3128

cargo fmt