Crates.io | chinese-format |
lib.rs | chinese-format |
version | 0.9.0 |
source | src |
created_at | 2024-05-02 03:40:02.097545 |
updated_at | 2024-09-21 17:28:10.171985 |
description | Convert data types to Chinese, with Rust |
homepage | |
repository | https://github.com/giancosta86/chinese-format |
max_upload_size | |
id | 1227434 |
size | 158,623 |
Convert data types to Chinese, with Rust
This crate focuses on converting data types to Chinese
,
which can be achieved by implementing the ChineseFormat
trait.
As a consequence, the library provides:
ready-made conversions for standard data types (integers,
strings, Option
, pairs, ...) - but also for fairly specific types like DigitSequence
.
Gregorian date/time, in the gregorian
module, in different formats via DateBuilder
, LinearTime
and DeltaTime
.
Monetary units, in the currency
module - at present, RenminbiCurrency
(人民币).
Dedicated numeric types - such as Decimal
, Fraction
and Sign
.
the ChineseVec
sequence, to simplify the manipulation of arbitrary
chains of logograms, as well as placeholders.
the Measure
trait and its related macros - especially define_measure
.
The crate supports the following optional features:
digit-sequence
:
enables conversions to Chinese for DigitSequence.
enables the Decimal
and IntegerPart
types.
currency
: enables the whole currency
module for monetary conversions.
gregorian
: enables the gregorian
module for date/time conversions.
Also enables: digit-sequence
.
https://crates.io/crates/chinese-format
https://docs.rs/chinese-format