Add StoreAction::uppercase() utility function
For debugging output convenience
This commit is contained in:
parent
741ebff2da
commit
ca47744108
|
@ -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> {
|
||||||
|
|
Loading…
Reference in New Issue