1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
//! [dyer] is designed for reliable, flexible and fast Request-Response based service, including data processing, web-crawling and so on, providing some friendly, flexible, comprehensive features without compromising speed.
//!
//! `dyer` provides some high-level features:
//!
//! * asynchronous, lock-free, concurrent streaming and I/O, make the best of thread pool, network, and system
//! resource.
//! * Event-driven, once you set the initials and recursive generator, `dyer` will handle
//! the rest of it.
//! * User-friendly and flexible, `dyer` offers high-level, easy to use wrappers and APIs what does a lot for you.
//!
//! **Get started** by installing [dyer-cli] and looking over the [examples].
//!
//! [dyer]: https://github.com/HomelyGuy/dyer
//! [examples]: https://github.com/HomelyGuy/dyer/tree/master/examples/
//! [dyer-cli]: https://github.com/HomelyGuy/dyer-cli
//!
//! # Quick Start
//!
//! [**dyer-cli**] is a handy tool for your easy and fast use of dyer, and recommanded to intergrate
//! ### Prerequisite
//! - `rust` and `cargo` must be installed,
//! - OpenSSL library is required to compile openssl-sys(if not installed, see [here])
//!
//! [here]: https://github.com/HomelyGuy/dyer/tree/master/examples/
//!
//! the following code helps you get the tool:
//! ```bash
//! cargo install dyer-cli
//! ```
//! Once installed, run `dyer` in your terminal or cmd prompt, it prints some info like
//! ```bash
//! Handy tool for dyer
//! ```
//! then dyer-cli is successfully installed.
//!
//! ## Create A Project
//!
//! Dyer-cli generates a template that contains many useful instances and instructions when using dyer with
//! following code:
//! ```bash
//! dyer new myproject
//! ```
//! It will create a project called `myproject` and the files layout displays:
//! ```bash
//! |___Cargo.toml
//! |___Readme.md
//! |___data/
//! |___data/tasks/
//! |___src/
//! |___src/affix.rs
//! |___src/entity.rs
//! |___src/parser.rs
//! |___src/actor.rs
//! |___src/middleware.rs
//! |___src/pipeline.rs
//! ```
//! Main functionality of each file:
//! * the `affix.rs` serves as an actor to adjust and satisfy additional requirement
//! * the `entity.rs` contains entities/data structure to be used/collected
//! * the `parser.rs` contains functions that extract entities from response
//! * the `actor.rs` contains initial when opening and final things to do when closing
//! * the `middleware.rs` contains Some middlewares that process data at runtime
//! * the `pipeline.rs` contains entities manipulation including data-storage, displsying and so on
//! * the `lib.rs` exports all modules inside the directory, just do nothing here normally
//! * `Cargo.toml` is the basic configuration of the project
//! * `README.md` contains some instructions of the project
//! * `data/` place to store/load files of `App` when load-balancing and backup
//!
//! Then it is your show time, basically there are simple example items(`function`, `enum`, `struct`)
//! in each file you can follow. After that check your code
//! ```bash
//! dyer check
//! ```
//! if you run it the first time, dyer-cli will download the crates and then check the code.
//! if some warning happens such as `unused import` or `dead code` the command does a lot for you:
//! ```bash
//! dyer fix
//! ```
//! A wraper of `cargo fix`, if some warning happens such as `unused import` or `dead code` the command does a lot for you. However it won't help if some errors occur, if so, you have to debug the code manually.
//!
//! Edit `dyer.cfg` file in the root directory
//!
//! the file contains some configurations of `ArgApp` that will update periodically, for more details see
//! [dyer.cfg Configuration]
//!
//! When the program compiles, haha run it:
//! ```bash
//! dyer run
//! ```
//! [dyer.cfg Configuration]: crate::engine::arg
//!
//! Short as it seems, here represents the normal procedure to write your program. It is believed that learning by example is the best, and some [examples] are provided to illustrate how to use.
//!
//! # Features to be added
//!
//! - [x] Dyer-cli Command-Line Tool Support
//! - [x] Interrupt and Resume Support
//! - [x] Lock-free WorkFlow
//! - [ ] Multiple Actors, MiddleWares, PipeLines
//! - [ ] More to go
//!
//! # Problem And Feedback
//!
//! It is, of course, probable that bugs and errors lie in somewhere, and defects may appear in an
//! unexpected way, if you got any one, comments and suggestions are welcome, please new a issue in
//! [my github].
//!
//! [examples]: https://github.com/HomelyGuy/dyer/tree/master/examples/
//! [**dyer-cli**]: https://crates.io/crates/dyer-cli
//! [my github]: https://github.com/HomelyGuy
pub use ;
pub use ;
pub use ;
pub use FNMAP;
pub use ;
pub use crate;
pub use async_trait;
pub use ;
pub use log;