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 fmtyor 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
Iteratorformatting methods.
Functions§
- concat
- Concatenates
Iteratoritems. - concat_
map - Concatenates mapped
Iteratorresults. - concat_
map_ once - Concatenates mapped
Iteratorresults, at most once. - concat_
once - Concatenates
Iteratoritems, 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
Resultvariant. - cond_
with - Conditionally writes a closure result.
- cond_
with_ option - Conditionally writes a closure
Optionresult. - csv
- Concatenates
Iteratoritems with,between each. - csv_map
- Concatenates mapped
Iteratorresults with,between each. - csv_
map_ once - Concatenates mapped
Iteratorresults with,between each, at most once. - csv_
once - Concatenates
Iteratoritems 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
leftandright. - join
- Concatenates
Iteratoritems with a separator between each. - join_
map - Concatenates mapped
Iteratorresults with a separator between each. - join_
map_ once - Concatenates mapped
Iteratorresults with a separator between each, at most once. - join_
once - Concatenates
Iteratoritems 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
ntimes. - repeat_
with - Repeats
nresults of a closure. - to_
ascii_ lowercase - Converts to ASCII lowercase.
- to_
ascii_ uppercase - Converts to ASCII uppercase.
- truncate_
chars - Shortens to
lenchars.