Expand description
common通用工具
Re-exports
pub extern crate tina_core;
Modules
- Getting started
- A Big Decimal
- BSON, short for Binary JSON, is a binary-encoded serialization of JSON-like documents. Like JSON, BSON supports the embedding of documents and arrays within other documents and arrays. BSON also contains extensions that allow representation of data types that are not part of the JSON spec. For example, BSON has a datetime type and a binary data type.
- Provides abstractions for working with bytes.
- A UTF-8 encoded read-only string using Bytes as storage.
- Rust Excel/OpenDocument reader
- Chrono: Date and Time for Rust
- Config organizes hierarchical or layered configurations for Rust applications.
- Helper trait to create instances of large structs with default value on heap directly without going through stack.
- Firestorm is the low-overhead intrusive flamegraph profiler for Rust. For documentation and usage, please see Firestorm on Github
- Fluent is a modern localization system designed to improve how software is translated.
- Abstractions for asynchronous programming.
- Combinators and utilities for working with
Future
s,Stream
s,Sink
s, and theAsyncRead
andAsyncWrite
traits. - Fx Hash
- A Rust validation library
- This Rust crate can be used to interact with the Google Authenticator mobile app for 2-factor-authentication. This Rust crates can generate secrets, generate codes, validate codes and present a QR-Code for scanning the secret. It implements TOTP according to RFC6238
- heck is a case conversion library.
- A crate with utilities to get and set the system’s host name.
- Hound, a wav encoding and decoding library.
- A general purpose library of common HTTP types
- httparse
- Date and time utils for HTTP.
- Overview
IndexMap
is a hash table where the iteration order of the key-value pairs is independent of the hash values of the keys.- Extra iterator adaptors, functions and macros.
- Create and parses JWT (JSON Web Tokens)
- Language tags can be used identify human languages, scripts e.g. Latin script, countries and other regions.
- A synchronization primitive for thread-local task wakeup.
- A mapped diagnostic context (MDC) for use with the
log
crate. - 相关声明宏
- The MD5 hash function.
- This library provides heavily optimized routines for string search primitives.
- Mime
- This crate contains the officially supported MongoDB Rust driver, a client side library that can be used to interact with MongoDB deployments in Rust applications. It uses the
bson
crate for BSON support. The driver contains a fully async API that supports eithertokio
(default) orasync-std
, depending on the feature flags set. The driver also has a sync API that may be enabled via the"sync"
or"tokio-sync"
feature flag. - Guessing of MIME types by file extension.
- Overview
- URLs use special characters to indicate the parts of the request. For example, a
?
question mark marks the end of a path and the start of a query string. In order for that character to exist inside a path, it needs to be encoded differently. - QRCode encoder
- Utilities for random number generation
- redis-rs is a Rust implementation of a Redis client library. It exposes a general purpose interface to Redis and also provides specific helpers for commonly used functionality.
- This crate provides a library for parsing, compiling, and executing regular expressions. Its syntax is similar to Perl-style regular expressions, but lacks a few features like look around and backreferences. In exchange, all searches execute in linear time with respect to the size of the regular expression and search text.
- reqwest
- This crate provides
ClientWithMiddleware
, a wrapper aroundreqwest::Client
with the ability to attach middleware which runs on every request. - Serde
- This crate provides Serde’s two derive macros.
- Serde JSON
- Serde support for querystring-style strings
- This library provides a way to access system information such as CPU load, mounted filesystems, network interfaces, etc.
- Thread-ID: get a unique ID for the current thread.
- tina core mod
- 过程宏
- A runtime for writing reliable network applications without compromising speed.
async fn(Request) -> Result<Response, Error>
- Layer traits and extensions.
- Definition of the core
Service
trait to Tower - A scoped, structured logging and diagnostics system.
- Core primitives for
tracing
. - Utilities for implementing and composing
tracing
subscribers. unic-langid
is a core API for parsing, manipulating, and serializing Unicode Language Identifiers.- To encode a string, do the following:
- User Agent Parser
- Want to have your API documented with OpenAPI? But you don’t want to see the trouble with manual yaml or json tweaking? Would like it to be so easy that it would almost be like utopic? Don’t worry utoipa is just there to fill this gap. It aims to do if not all then the most of heavy lifting for you enabling you to focus writing the actual API logic instead of documentation. It aims to be minimal, simple and fast. It uses simple proc macros which you can use to annotate your code to have items documented.
- This is private utoipa codegen library and is not used alone.
- Generate and parse universally unique identifiers (UUIDs).
- xlsxwriter-rs
- YAML 1.2 implementation in pure Rust.
- A library for reading and writing ZIP archives. ZIP is a format designed for cross-platform file “archiving”. That is, storing a collection of files in a single datastream to make them easier to share between computers. Additionally, ZIP is able to compress and encrypt files in its archives.
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
.