Crate shkeleton [−] [src]
Shkeleton is a skeleton Rust project which defines some default dependencies and contains some common API's. The idea behind a Shkeleton is that you don't need to update all the dependencies by hand for every your library or binary, you could just update a Shkeleton version and get all updates.
Dependencies
- log - logging facade
- byteorder - dealing with data reading/writing
- lazy_static - macro to define a lazy static constants
- array_tool - utilities for dealing with arrays
- itertools - utilities for dealing with iterators
- regex - regular expressions
- url - handling URLs
Features
Shkeleton also defines a few features which extend the dependencies list and APIs.
CLI feature
Additional dependencies:
- clap - define your command line arguments parser
- fern - complex logger implementation
- [deprecated] simple_logger - simple logger implementation
Concurrency feature
Additional dependencies:
- scoped-pool - define and use a thread pool
- num_cpus - get the number of CPUs and cores available
- parking_lot - faster syncronization primitives Concurrency feature also defines a facade for RwLock, which allowes to hide an implementation (std::sync::RwLock or parking_lot::RwLock) behind this facade and switch implementation without the need to update sources. It could be valuable because the parking_lot implementation lacks "lock poisoning" and maybe harder to debug deadlocks.
Re-exports
pub extern crate log; |
pub extern crate byteorder; |
pub extern crate itertools; |
pub extern crate array_tool; |
pub extern crate regex; |
pub extern crate url; |
pub extern crate lazy_static; |
pub use lazy_static::*; |
pub use log::*; |
pub use byteorder::*; |
pub use itertools::*; |
pub use array_tool::*; |
pub use regex::*; |
pub use url::*; |
Modules
sync |
Macros
debug |
Logs a message at the debug level. |
define_encode_set |
Define a new struct
that implements the |
error |
Logs a message at the error level. |
info |
Logs a message at the info level. |
iproduct |
Create an iterator over the “cartesian product” of iterators. |
izip |
Create an iterator running multiple iterators in lockstep. |
lazy_static | |
log |
The standard logging macro. |
log_enabled |
Determines if a message logged at the specified level in that module will be logged. |
trace |
Logs a message at the trace level. |
warn |
Logs a message at the warn level. |