use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AclGrantScope {
#[serde(rename = "target")]
Target,
#[serde(rename = "all_tables")]
AllTables,
#[serde(rename = "all_sequences")]
AllSequences,
#[serde(rename = "all_functions")]
AllFunctions,
#[serde(rename = "future_tables")]
FutureTables,
#[serde(rename = "future_sequences")]
FutureSequences,
#[serde(rename = "future_functions")]
FutureFunctions,
}
impl std::fmt::Display for AclGrantScope {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Target => write!(f, "target"),
Self::AllTables => write!(f, "all_tables"),
Self::AllSequences => write!(f, "all_sequences"),
Self::AllFunctions => write!(f, "all_functions"),
Self::FutureTables => write!(f, "future_tables"),
Self::FutureSequences => write!(f, "future_sequences"),
Self::FutureFunctions => write!(f, "future_functions"),
}
}
}
impl Default for AclGrantScope {
fn default() -> AclGrantScope {
Self::Target
}
}