pzzld_server/types/
mod.rs

1/*
2    Appellation: types <module>
3    Contrib: FL03 <jo3mccain@icloud.com>
4*/
5//! # types
6//!
7//! The `types` module provides a set of types and traits that are used throughout the application.
8#![allow(unused)]
9#[doc(inline)]
10pub use self::{
11    platform::PlatformType,
12    power::Power,
13    stage::{Stage, Stages},
14};
15
16pub mod platform;
17pub mod power;
18pub mod stage;
19pub mod timestamp;
20
21pub(crate) mod prelude {
22    pub use super::platform::*;
23    pub use super::power::*;
24    pub use super::stage::*;
25    pub use super::timestamp::*;
26    pub use super::{BoxError, BoxResult, Result};
27}
28
29/// A type alias for `Box<dyn core::error::Error + Send + Sync>`.
30pub type BoxError = Box<dyn core::error::Error + core::marker::Send + core::marker::Sync>;
31/// A type alias for `Result<T, BoxError>`.
32pub type BoxResult<T> = core::result::Result<T, BoxError>;
33///
34pub type Result<T = ()> = core::result::Result<T, crate::Error>;
35
36/// A type alias for [Sender<T>](tokio::sync::broadcast::Sender).
37pub(crate) type PowerTx = tokio::sync::broadcast::Sender<()>;
38/// A type alias for [`u32`] used to identify an object
39pub(crate) type Uid = u32;