Impl Debug, Clone, Display for StoreAction
This commit is contained in:
parent
d03b13be10
commit
61c3519d45
1 changed files with 18 additions and 2 deletions
|
@ -1,8 +1,24 @@
|
||||||
|
use std::fmt::{Display, Formatter, Error};
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
pub enum StoreAction {
|
pub enum StoreAction {
|
||||||
Create,
|
Create,
|
||||||
Retrieve,
|
Retrieve,
|
||||||
Update,
|
Update,
|
||||||
Delete,
|
Delete,
|
||||||
|
|
||||||
// "Read" doesn't matter, as we do not use git on read actions, only when altering content.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue