Batteries-included common utils
Install
Since crates.io does not have namespaces, this crate has a prefix.
You should manually rename it to cu, as that's what the proc-macros
expect.
# Cargo.toml
# ...
[]
= "pistonite-cu"
= "..." # check by running `cargo info pistonite-cu`
= [ "full" ] # see docs
# ...
[]
General Principal
cu tries to be as short as possible with imports. Common and misc
utilities are exported directly by the crate and should be used
as cu::xxx directly. Sub-functionalities are bundled when makes
sense, and should be called from submodules directly, like cu::fs::xxx
or cu::co::xxx. The submodules are usually 2-4 characters.
The only time to use use to import from cu, is with the prelude module
pre:
# use pistonite_cu as cu;
use *;
This imports traits like [Context] and [PathExtension] into scope.
Feature Reference:
cli,print,prompt: Seecli. Note that logging is still available without any feature flag.coroutineandcoroutine-heavy: Enablesasyncand integration withtokio. Seecu::co.fs: Enables file system utils. Seecu::fsandcu::bin.process: Enables utils spawning child process. See [Command].parse,json,yaml,toml: Enable parsing utilities, and additional support for common formats. SeeParse.