Expand description
§fmty

Composable core::fmt
utilities, brought
to you by Nikolai Vazquez.
If you find this crate useful, consider starring it as well as sponsoring or donating once. 💖
§Install
This crate is available on crates.io and can be
used by running the following cargo
command in your project directory:
cargo add fmty
or by manually adding the following to your project’s Cargo.toml
:
[dependencies]
fmty = "0.1.1"
§MSRV
This crate’s minimum supported Rust version is 1.56.0
.
Updating the Rust version is considered a breaking change that will result in an
appropriate crate version update.
§License
Like the Rust project, this library may be used under either the MIT License or Apache License (Version 2.0) at your choosing.
Modules§
- types
- Types defined by this crate.
Macros§
- concat
- Concatenates items that may be different types.
- fmt
- Like
format_args!
orfmt_with()
depending on usage. - fmt_
args - Like
core::format_args!
, but with full ownership. - format_
args - Like
core::format_args!
, but with full ownership.
Traits§
- FmtIterator
Iterator
formatting methods.
Functions§
- concat
- Concatenates
Iterator
items. - concat_
map - Concatenates mapped
Iterator
results. - concat_
map_ once - Concatenates mapped
Iterator
results, at most once. - concat_
once - Concatenates
Iterator
items, at most once. - concat_
tuple - Concatenates tuple items that may be different types.
- cond
- Conditionally writes a value.
- cond_
option - Conditionally writes an
Option
. - cond_
option_ or - Conditionally writes an
Option
, or its fallback ifNone
. - cond_or
- Conditionally writes a value, or its fallback if
false
. - cond_
result - Conditionally writes a
Result
variant. - cond_
with - Conditionally writes a closure result.
- cond_
with_ option - Conditionally writes a closure
Option
result. - csv
- Concatenates
Iterator
items with,
between each. - csv_map
- Concatenates mapped
Iterator
results with,
between each. - csv_
map_ once - Concatenates mapped
Iterator
results with,
between each, at most once. - csv_
once - Concatenates
Iterator
items with,
between each, at most once. - csv_
tuple - Concatenates tuple items with
,
between each. - fmt_
with - Formats via a closure.
- infix
- Places a value between
left
andright
. - join
- Concatenates
Iterator
items with a separator between each. - join_
map - Concatenates mapped
Iterator
results with a separator between each. - join_
map_ once - Concatenates mapped
Iterator
results with a separator between each, at most once. - join_
once - Concatenates
Iterator
items with a separator between each, at most once. - join_
tuple - Concatenates tuple items with a separator between each.
- no_op
- Writes nothing.
- quote_
backtick - Places a value between
`
. - quote_
cjk - Places a value between
「
and」
. - quote_
cjk_ vert - Places a value between
﹁
and﹂
. - quote_
cjk_ white - Places a value between
『
and』
. - quote_
cjk_ white_ vert - Places a value between
﹃
and﹄
. - quote_
curly_ double - Places a value between
“
and”
. - quote_
curly_ single - Places a value between
‘
and’
. - quote_
de_ double - Places a value between
„
and“
. - quote_
de_ single - Places a value between
‚
and‘
. - quote_
double - Places a value between
"
. - quote_
guillemet_ double - Places a value between
«
and»
. - quote_
guillemet_ single - Places a value between
‹
and›
. - quote_
single - Places a value between
'
. - repeat
- Repeats a value
n
times. - repeat_
with - Repeats
n
results of a closure. - to_
ascii_ lowercase - Converts to ASCII lowercase.
- to_
ascii_ uppercase - Converts to ASCII uppercase.
- truncate_
chars - Shortens to
len
char
s.