Docs improvement (#80)

* I little bit improve docs

* README

* disable tests for docs
This commit is contained in:
Pmarquez 2022-09-03 11:05:58 +00:00 committed by GitHub
parent 7fb4423bf5
commit d3fc479b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 9 deletions

View file

@ -11,6 +11,9 @@ rust-version = "1.62"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
doctest = false
[features]
default = ["blocking", "asynk"]
blocking = ["diesel", "diesel-derive-enum", "dotenv"]

View file

@ -15,3 +15,6 @@ tests:
ignored:
DATABASE_URL=postgres://postgres:postgres@localhost/fang cargo test --all-features -- --color always --nocapture --ignored
doc:
cargo doc --open

View file

@ -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]
@ -288,9 +288,9 @@ There are three retention modes you can use:
```rust
pub enum RetentionMode {
KeepAll, \\ doesn't remove tasks
RemoveAll, \\ removes all tasks
RemoveFinished, \\ default value
KeepAll, // doesn't remove tasks
RemoveAll, // removes all tasks
RemoveFinished, // default value
}
```
@ -304,10 +304,10 @@ You can use use `SleepParams` to confugure sleep values:
```rust
pub struct SleepParams {
pub sleep_period: Duration, \\ default value is 5 seconds
pub max_sleep_period: Duration, \\ default value is 15 seconds
pub min_sleep_period: Duration, \\ default value is 5 seconds
pub sleep_step: 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 min_sleep_period: Duration, // default value is 5 seconds
pub sleep_step: Duration, // default value is 5 seconds
}
```

View file

@ -1,3 +1,4 @@
#![doc = include_str!("../README.md")]
#![allow(clippy::extra_unused_lifetimes)]
use std::time::Duration;
@ -87,9 +88,10 @@ pub extern crate chrono;
#[doc(hidden)]
pub use serde_derive::{Deserialize, Serialize};
#[doc(hidden)]
pub use chrono::DateTime;
#[doc(hidden)]
pub use chrono::Utc;
pub use cron::Schedule;
#[cfg(feature = "blocking")]
pub mod blocking;