24 lines
558 B
Rust
24 lines
558 B
Rust
use std::fmt::{Display, Formatter, Error};
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub enum StoreAction {
|
|
Create,
|
|
Retrieve,
|
|
Update,
|
|
Delete,
|
|
}
|
|
|
|
impl Display for StoreAction {
|
|
|
|
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error> {
|
|
write!(fmt, "StoreAction: {}",
|
|
match *self {
|
|
StoreAction::Create => "create",
|
|
StoreAction::Retrieve => "retrieve",
|
|
StoreAction::Update => "update",
|
|
StoreAction::Delete => "delete",
|
|
})
|
|
}
|
|
|
|
}
|
|
|