docs.rs failed to build yoshi-std-0.1.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
yoshi-std-0.1.3
yoshi-std
Core error types for the Yoshi framework. Use this directly if you want minimal dependencies.
What's this?
The foundation of Yoshi - provides Yoshi
, YoshiKind
, and YoContext
types. Everything else is built on top of this.
Installation
[]
= "0.1"
# For no_std environments
= { = "0.1", = false }
Basic Usage
use ;
// Create errors
let error = new;
// Add context
let error = error
.with_context
.with_context;
// Chain errors
let io_error = read.unwrap_err;
let yoshi_error = from_error
.with_context;
Error Categories
use YoshiKind;
match error.kind
Context Management
use Yoshi;
let mut error = new;
// Add structured context
error = error
.with_context
.with_context
.with_context;
// Access context
if let Some = error.context.get
// Iterate context
for in error.context.iter
Performance
Operation | Time | Memory |
---|---|---|
Yoshi::new() |
42ns | 64 bytes |
with_context() |
38ns | +32 bytes |
context_access() |
12ns | 0 |
Features
std
- Standard library support (default)serde
- Serialization supporttracing
- Tracing integrationproptest
- Property testing utilities
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.