contained_core/primitives.rs
1/*
2 Appellation: primitives <module>
3 Contrib: FL03 <jo3mccain@icloud.com>
4 Description: ... summary ...
5*/
6pub use self::{constants::*, types::*};
7
8mod constants {}
9
10mod types {
11 use crate::{AsyncError, Error};
12 use std::sync::{Arc, Mutex};
13
14 /// A type alias for a `Result` with the error type `AsyncError`.
15 pub type AsyncResult<T = ()> = std::result::Result<T, AsyncError>;
16 /// Type alias for a [Result]
17 pub type Resultant<T = (), E = Error> = Result<T, E>;
18 /// A type alias for a thread-safe [Vec] of [Mutex]es.
19 pub type Sharded<T> = Arc<Vec<Mutex<T>>>;
20 /// A type alias for an thread-safe [Mutex].
21 pub type Shared<T> = Arc<Mutex<T>>;
22}