std_utils 1.0.0

Standard utilities for Rust
Documentation
  • Coverage
  • 0%
    0 out of 19 items documented0 out of 16 items with examples
  • Size
  • Source code size: 12.87 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 20s Average build duration of successful builds.
  • all releases: 20s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • LeviLovie/std_utils
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • LeviLovie

std_utils

Some common utils I add to every project

Usage

This crate contains traits tht add .anyhow() to std::result::Result<T, String>, std::result::Result<T, std::error::Error>, and Option<T>. Method returns anyhow::Result<T, anyhow::Error>.

Trait Debugging also implements .log() and .logmsg("Msg here") which uses tracing to log an error if it exists and return self, .panic() and .panicmsg() do the same but panic in case of error, .context("Msg here") and .dot() are used for backtraces, taken from anyhow_ext.