1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
/*
Appellation: specs <module>
Contrib: FL03 <jo3mccain@icloud.com>
Description: ... Summary ...
*/
pub trait Addressable<Addr> {
fn address(self) -> Addr;
}
/// Trait for signaling a structure with a dedicated build stage
pub trait Buildable {
type Error;
fn build() -> Result<Self, Self::Error>
where
Self: Sized;
}
/// Quickly derive elligible naming schematics for the desired structure
pub trait Named {
fn name(&self) -> String;
fn slug(&self) -> String {
self.name().to_lowercase()
}
}
/// Interface for time-related data-structures
pub trait Temporal {
fn timestamp(&self) -> i64;
}