background-jobs/jobs-server-tokio/src/lib.rs

18 lines
324 B
Rust
Raw Normal View History

2018-11-08 04:49:27 +00:00
use failure::Error;
mod server;
mod spawner;
mod worker;
2018-11-08 04:49:27 +00:00
pub use crate::{server::ServerConfig, spawner::SpawnerConfig, worker::WorkerConfig};
2018-11-08 04:49:27 +00:00
fn coerce<T, F>(res: Result<Result<T, Error>, F>) -> Result<T, Error>
where
F: Into<Error>,
{
match res {
Ok(res) => res,
Err(e) => Err(e.into()),
}
}