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 30 31 32
/*
Appellation: crud <module>
Creator: FL03 <jo3mccain@icloud.com>
Description:
... Summary ...
*/
#[derive(Clone, Copy, Debug, Hash, PartialEq, serde::Deserialize, serde::Serialize)]
pub enum CRUDState {
Create,
Read,
Update,
Delete,
}
impl Default for CRUDState {
fn default() -> Self {
Self::Read
}
}
#[cfg(test)]
mod tests {
use super::CRUDState;
#[test]
fn test_crud_state() {
let actual = CRUDState::default();
let expected = CRUDState::Read;
assert_eq!(actual, expected)
}
}