forked from lavina/lavina
26 lines
556 B
Rust
26 lines
556 B
Rust
pub use std::future::Future;
|
|
|
|
pub use tokio::pin;
|
|
pub use tokio::select;
|
|
pub use tokio::sync::oneshot::{channel as oneshot, Receiver as Deferred, Sender as Promise};
|
|
pub use tokio::task::JoinHandle;
|
|
|
|
pub mod log {
|
|
pub use tracing::{debug, error, info, warn};
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, anyhow::Error>;
|
|
pub type Str = std::sync::Arc<str>;
|
|
|
|
pub fn fail(msg: &str) -> anyhow::Error {
|
|
anyhow::Error::msg(msg.to_owned())
|
|
}
|
|
|
|
macro_rules! ffail {
|
|
($($arg:tt)*) => {
|
|
fail(&format!($($arg)*))
|
|
};
|
|
}
|
|
|
|
pub(crate) use ffail;
|