Expand description
common通用工具
Re-exports
pub extern crate async_trait;
pub extern crate garde_derive;
pub extern crate rust_embed_impl;
pub extern crate serde_derive;
pub extern crate tina_macro;
pub extern crate tracing;
pub extern crate utoipa_gen;
pub use base64;
pub use bigdecimal;
pub use bson;
pub use bytes;
pub use bytestring;
pub use calamine;
pub use chrono;
pub use config;
pub use dashmap;
pub use deadpool;
pub use default_boxed;
pub use either;
pub use firestorm;
pub use fluent_bundle;
pub use futures;
pub use futures_util;
pub use fxhash;
pub use garde;
pub use google_authenticator;
pub use heck;
pub use hostname;
pub use hound;
pub use http;
pub use httparse;
pub use httpdate;
pub use image;
pub use indexmap;
pub use intl_memoizer;
pub use itertools;
pub use jsonwebtoken;
pub use language_tags;
pub use local_waker;
pub use lodepng;
pub use log4rs;
pub use log_mdc;
pub use md5;
pub use memchr;
pub use mime;
pub use mongodb;
pub use new_mime_guess;
pub use num_bigint;
pub use num_traits;
pub use once_cell;
pub use percent_encoding;
pub use prost;
pub use qrcode;
pub use rand;
pub use rbs;
pub use redis;
pub use regex;
pub use reqwest;
pub use reqwest_middleware;
pub use rust_embed;
pub use serde;
pub use serde_json;
pub use serde_qs;
pub use serde_value;
pub use serde_yaml;
pub use systemstat;
pub use thread_id;
pub use tokio;
pub use tower;
pub use tower_layer;
pub use tower_service;
pub use tracing_core;
pub use tracing_subscriber;
pub use unic_langid;
pub use urlencoding;
pub use user_agent_parser;
pub use utoipa;
pub use uuid;
pub use xlsxwriter;
pub use yaml_rust;
pub use zip;
pub use crate::macros::*;
Modules
- Callsites represent the source locations from which spans or events originate.
- Dispatches trace events to
Subscriber
s. - Events represent single points in time during the execution of a program.
Span
andEvent
key-value data.- Attach a span to a
std::future::Future
. - Trace verbosity level filtering.
- 相关声明宏
- Metadata describing trace data.
- Spans represent periods of time in which a program was executing in a particular context.
- Collects and records trace data.
- tina core mod
Macros
- Construct an ad-hoc error from a string or existing non-
anyhow
error value. - 条件编译调试
- 通用AppError构造
- 错误转换
- 错误转换
- 错误转换
- 构造参数校验错误
- 构造参数校验错误
- 构造系统内部错误
- 构造系统内部错误
- Return early with an error.
- Constructs an event at the debug level.
- Constructs a span at the debug level.
- Constructs an event at the error level.
- Constructs a span at the error level.
- Constructs a new
Event
. - Tests whether an event with the specified level and target would be enabled.
- Construct an ad-hoc error from a string or existing non-
anyhow
error value. - 国际化字符串宏
- Constructs an event at the info level.
- Constructs a span at the info level.
- Statically constructs new span metadata.
- Create OpenAPI Schema from arbitrary type.
- Constructs a new span.
- Tests whether a span with the specified level and target would be enabled.
- Constructs an event at the trace level.
- Constructs a span at the trace level.
- Constructs an event at the warn level.
- Constructs a span at the warn level.
Structs
- Iterator of a chain of source errors.
Dispatch
trace data to aSubscriber
.- The
Error
type, a wrapper around a dynamic error type. Event
s represent single points in time where something occurred during the execution of a program.- Identifies a span within the context of a subscriber.
- Describes the level of verbosity of a span or event.
- A handle representing a span, with the capability to enter the span if it exists.
Traits
- Trait implemented by callsites.
- Provides the
context
method forResult
. - Attaches spans to a
std::future::Future
. - Trait representing the functions required to collect trace data.
- A field value of an erased type.
Functions
- Equivalent to Ok::<_, anyhow::Error>(value).
Type Definitions
Result<T, Error>
Attribute Macros
- Instruments a function to create and enter a
tracing
span every time the function is called. - Path attribute macro implements OpenAPI path for the decorated function.
Derive Macros
- Generate path parameters from struct’s fields.
- Generate responses with status codes what can be attached to the
utoipa::path
. - Generate OpenApi base object with defaults from project settings.
- Generate reusable OpenAPI response what can be used in
utoipa::path
or inOpenApi
. - Generate reusable OpenAPI schema to be used together with
OpenApi
.