Add StoreAction::uppercase() utility function
For debugging output convenience
This commit is contained in:
parent
741ebff2da
commit
ca47744108
1 changed files with 12 additions and 0 deletions
|
@ -8,6 +8,18 @@ pub enum StoreAction {
|
|||
Delete,
|
||||
}
|
||||
|
||||
impl StoreAction {
|
||||
|
||||
pub fn uppercase(&self) -> &str {
|
||||
match *self {
|
||||
StoreAction::Create => "CREATE",
|
||||
StoreAction::Retrieve => "RETRIEVE",
|
||||
StoreAction::Update => "UPDATE",
|
||||
StoreAction::Delete => "DELETE",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for StoreAction {
|
||||
|
||||
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error> {
|
||||
|
|
Loading…
Reference in a new issue