com_croftsoft_lib_role/
lib.rs

1// =============================================================================
2//! - CroftSoft Roles Library
3//!
4//! # Metadata
5//! - Copyright: © 2023-2024 [`CroftSoft Inc`]
6//! - Author: [`David Wallace Croft`]
7//! - Created: 2023-01-18
8//! - Updated: 2024-02-19
9//!
10//! [`CroftSoft Inc`]: https://www.croftsoft.com/
11//! [`David Wallace Croft`]: https://www.croftsoft.com/people/david/
12// =============================================================================
13
14pub trait Initializer<T = ()> {
15  fn initialize(&self) -> T;
16}
17
18pub trait InitializerMut<T = ()> {
19  fn initialize(&mut self) -> T;
20}
21
22pub trait Painter<T = ()> {
23  fn paint(&self) -> T;
24}
25
26pub trait PainterMut<T = ()> {
27  fn paint(&mut self) -> T;
28}
29
30pub trait Preparer<T = ()> {
31  fn prepare(&self) -> T;
32}
33
34pub trait PreparerMut<T = ()> {
35  fn prepare(&mut self) -> T;
36}
37
38pub trait Updater<T = ()> {
39  fn update(&self) -> T;
40}
41
42pub trait UpdaterMut<T = ()> {
43  fn update(&mut self) -> T;
44}
45
46pub trait Validator<T = ()> {
47  fn validate(&self) -> T;
48}
49
50pub trait ValidatorMut<T = ()> {
51  fn validate(&mut self) -> T;
52}