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§
- config
config - Generic configuration parsers.
- duration
serde Durationwrapper forserde- reqwest
reqwest - Helpers for
reqwest - timestamp
timeandserde - Wrapper over
OffsetDateTimewith RFC3339 JSON representation
Structs§
- AsString
- Helper wrapper to serialize types as strings using
std::str::FromStrandToString. - BaseUrl
base_url - A wrapper over
Urlto deserialize a URL as a base url (adding the trailing slash if necessary) - Level
Filter level_filter tracing::level_filters::LevelFilterwrapper withDeserializeimpl.
Enums§
- Base
UrlParse Error base_url - Parsing error for
BaseUrl
Traits§
- Generic
Combinators - Generic combinators on polymorphic unconstrained types that
stdlacks. - Iterator
Ext - Extension to
Iterator
Functions§
- ignore
- Helper function to convert values to
()