Crate famedly_rust_utils

Source
Expand description

This crate consists of incohesive generic types and functions that are needed in almost every crate but are so small that making a separate crate for them is too much.

This includes many small extensions to third crates; all such features are gated behind appropriate features to prevent dependency graph explosion.

See GenericCombinators for some useful generic methods.

See LevelFilter, BaseUrl and duration for useful wrapper types to use in your serde-based configs.

Enable schemars feature to get schemars::JsonSchema impls for “config-helper” types to generate config schemas (for documentation and validation purposes).

See config::parse_config for an opinionated figment-based configuration parser.

See reqwest::ReqwestErrorWithBody for a reqwest error that keeps the body of the error instead of discarding it in favor of the status code.

Modules§

configconfig
Generic configuration parsers.
durationserde
Duration wrapper for serde
reqwestreqwest
Helpers for reqwest

Structs§

BaseUrlbase_url
A wrapper over Url to deserialize a URL as a base url (adding the trailing slash if necessary)
LevelFilterlevel_filter
tracing::level_filters::LevelFilter wrapper with Deserialize impl.

Enums§

BaseUrlParseErrorbase_url
Parsing error for BaseUrl

Traits§

GenericCombinators
Generic combinators on polymorphic unconstrained types that std lacks.
IteratorExt
Extension to Iterator

Functions§

ignore
Helper function to convert values to ()