Docs improvement (#80)
* I little bit improve docs * README * disable tests for docs
This commit is contained in:
parent
7fb4423bf5
commit
d3fc479b68
4 changed files with 17 additions and 9 deletions
|
@ -11,6 +11,9 @@ rust-version = "1.62"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
doctest = false
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["blocking", "asynk"]
|
default = ["blocking", "asynk"]
|
||||||
blocking = ["diesel", "diesel-derive-enum", "dotenv"]
|
blocking = ["diesel", "diesel-derive-enum", "dotenv"]
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -15,3 +15,6 @@ tests:
|
||||||
|
|
||||||
ignored:
|
ignored:
|
||||||
DATABASE_URL=postgres://postgres:postgres@localhost/fang cargo test --all-features -- --color always --nocapture --ignored
|
DATABASE_URL=postgres://postgres:postgres@localhost/fang cargo test --all-features -- --color always --nocapture --ignored
|
||||||
|
|
||||||
|
doc:
|
||||||
|
cargo doc --open
|
||||||
|
|
16
README.md
16
README.md
|
@ -1,4 +1,4 @@
|
||||||
<p align="center"><img src="logo.png" alt="fang" height="300px"></p>
|
<p align="center"><img src="https://raw.githubusercontent.com/ayrat555/fang/master/logo.png" alt="fang" height="300px"></p>
|
||||||
|
|
||||||
[![Crates.io][s1]][ci] [![docs page][docs-badge]][docs] ![test][ga-test] ![style][ga-style]
|
[![Crates.io][s1]][ci] [![docs page][docs-badge]][docs] ![test][ga-test] ![style][ga-style]
|
||||||
|
|
||||||
|
@ -288,9 +288,9 @@ There are three retention modes you can use:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
pub enum RetentionMode {
|
pub enum RetentionMode {
|
||||||
KeepAll, \\ doesn't remove tasks
|
KeepAll, // doesn't remove tasks
|
||||||
RemoveAll, \\ removes all tasks
|
RemoveAll, // removes all tasks
|
||||||
RemoveFinished, \\ default value
|
RemoveFinished, // default value
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -304,10 +304,10 @@ You can use use `SleepParams` to confugure sleep values:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
pub struct SleepParams {
|
pub struct SleepParams {
|
||||||
pub sleep_period: Duration, \\ default value is 5 seconds
|
pub sleep_period: Duration, // default value is 5 seconds
|
||||||
pub max_sleep_period: Duration, \\ default value is 15 seconds
|
pub max_sleep_period: Duration, // default value is 15 seconds
|
||||||
pub min_sleep_period: Duration, \\ default value is 5 seconds
|
pub min_sleep_period: Duration, // default value is 5 seconds
|
||||||
pub sleep_step: Duration, \\ default value is 5 seconds
|
pub sleep_step: Duration, // default value is 5 seconds
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#![doc = include_str!("../README.md")]
|
||||||
#![allow(clippy::extra_unused_lifetimes)]
|
#![allow(clippy::extra_unused_lifetimes)]
|
||||||
|
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
@ -87,9 +88,10 @@ pub extern crate chrono;
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub use serde_derive::{Deserialize, Serialize};
|
pub use serde_derive::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[doc(hidden)]
|
||||||
pub use chrono::DateTime;
|
pub use chrono::DateTime;
|
||||||
|
#[doc(hidden)]
|
||||||
pub use chrono::Utc;
|
pub use chrono::Utc;
|
||||||
pub use cron::Schedule;
|
|
||||||
|
|
||||||
#[cfg(feature = "blocking")]
|
#[cfg(feature = "blocking")]
|
||||||
pub mod blocking;
|
pub mod blocking;
|
||||||
|
|
Loading…
Reference in a new issue