Add StoreAction::uppercase() utility function

For debugging output convenience
This commit is contained in:
Matthias Beyer 2016-09-07 21:37:08 +02:00
parent 741ebff2da
commit ca47744108
1 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,18 @@ pub enum StoreAction {
Delete, 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 { impl Display for StoreAction {
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error> { fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error> {