pub use ratatui; pub use crossterm; pub use jack; pub use midly; pub use clap; pub use std::sync::{Arc, Mutex, LockResult, RwLock, RwLockReadGuard, RwLockWriteGuard}; pub use std::collections::BTreeMap; pub use once_cell::sync::Lazy; pub use std::sync::atomic::{Ordering, AtomicBool}; pub use std::rc::Rc; pub use std::cell::RefCell; pub use std::marker::PhantomData; pub(crate) use std::error::Error; pub(crate) use std::io::{stdout}; pub(crate) use std::thread::{spawn, JoinHandle}; pub(crate) use std::time::Duration; pub(crate) use atomic_float::*; use better_panic::{Settings, Verbosity}; use std::ops::{Add, Sub, Mul, Div}; use std::cmp::{Ord, Eq, PartialEq}; use std::fmt::{Debug, Display}; /// Define and reexport submodules. #[macro_export] macro_rules! submod { ($($name:ident)*) => { $(mod $name; pub use self::$name::*;)* }; } /// Define public modules. #[macro_export] macro_rules! pubmod { ($($name:ident)*) => { $(pub mod $name;)* }; } /// Define test modules. #[macro_export] macro_rules! testmod { ($($name:ident)*) => { $(#[cfg(test)] mod $name;)* }; } submod! { audio edn engine focus space time tui } testmod! { test } /// Standard result type. pub type Usually = Result>; /// Standard optional result type. pub type Perhaps = Result, Box>; /// Standard numeric type. pub trait Number: Send + Sync + Copy + Add + Sub + Mul + Div + Ord + PartialEq + Eq + Debug + Display + Default + From + Into + Into { fn minus (self, other: Self) -> Self { if self >= other { self - other } else { 0.into() } } } impl Number for T where T: Send + Sync + Copy + Add + Sub + Mul + Div + Ord + PartialEq + Eq + Debug + Display + Default + From + Into + Into {}