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

View file

@ -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> {