#[repr(u8)]
pub enum PlayerRole {
Default,
Admin,
SuperAdmin,
}
Expand description
Enum for the different roles that a player could have used to determine their permissions to access different server functionality
Variants§
Default
The default no extra permissions level
Admin
Administrator role which can be added and removed by super admin.
SuperAdmin
Super admin role which is created on startup and used to manage other user roles
Trait Implementations§
source§impl ActiveEnum for PlayerRole
impl ActiveEnum for PlayerRole
source§fn try_from_value(v: &Self::Value) -> Result<Self, DbErr>
fn try_from_value(v: &Self::Value) -> Result<Self, DbErr>
Try to convert the corresponding value into enum variant.
source§fn into_value(self) -> Self::Value
fn into_value(self) -> Self::Value
Convert an owned enum variant into the corresponding value.
source§impl Clone for PlayerRole
impl Clone for PlayerRole
source§fn clone(&self) -> PlayerRole
fn clone(&self) -> PlayerRole
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PlayerRole
impl Debug for PlayerRole
source§impl<'de> Deserialize<'de> for PlayerRole
impl<'de> Deserialize<'de> for PlayerRole
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for PlayerRole
impl Display for PlayerRole
source§impl Into<Value> for PlayerRole
impl Into<Value> for PlayerRole
source§impl IntoEnumIterator for PlayerRole
impl IntoEnumIterator for PlayerRole
source§impl Ord for PlayerRole
impl Ord for PlayerRole
source§fn cmp(&self, other: &PlayerRole) -> Ordering
fn cmp(&self, other: &PlayerRole) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<PlayerRole> for PlayerRole
impl PartialEq<PlayerRole> for PlayerRole
source§fn eq(&self, other: &PlayerRole) -> bool
fn eq(&self, other: &PlayerRole) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PlayerRole> for PlayerRole
impl PartialOrd<PlayerRole> for PlayerRole
source§fn partial_cmp(&self, other: &PlayerRole) -> Option<Ordering>
fn partial_cmp(&self, other: &PlayerRole) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for PlayerRole
impl Serialize for PlayerRole
source§impl TryGetable for PlayerRole
impl TryGetable for PlayerRole
source§fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
fn try_get_by<I: ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError>
Get a value from the query result with an ColIdx
source§fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>
fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>
Get a value from the query result with prefixed column name
source§fn try_get_by_index(
res: &QueryResult,
index: usize
) -> Result<Self, TryGetError>
fn try_get_by_index( res: &QueryResult, index: usize ) -> Result<Self, TryGetError>
Get a value from the query result based on the order in the select expressions
source§impl ValueType for PlayerRole
impl ValueType for PlayerRole
impl Eq for PlayerRole
impl StructuralEq for PlayerRole
impl StructuralPartialEq for PlayerRole
Auto Trait Implementations§
impl RefUnwindSafe for PlayerRole
impl Send for PlayerRole
impl Sync for PlayerRole
impl Unpin for PlayerRole
impl UnwindSafe for PlayerRole
Blanket Implementations§
§impl<V> FromValueTuple for Vwhere
V: Into<Value> + ValueType,
impl<V> FromValueTuple for Vwhere V: Into<Value> + ValueType,
fn from_value_tuple<I>(i: I) -> Vwhere I: IntoValueTuple,
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<V> IntoValueTuple for Vwhere
V: Into<Value>,
impl<V> IntoValueTuple for Vwhere V: Into<Value>,
fn into_value_tuple(self) -> ValueTuple
source§impl<T> TryFromU64 for Twhere
T: ActiveEnum,
impl<T> TryFromU64 for Twhere T: ActiveEnum,
source§impl<T> TryGetableMany for Twhere
T: TryGetable,
impl<T> TryGetableMany for Twhere T: TryGetable,
source§fn try_get_many(
res: &QueryResult,
pre: &str,
cols: &[String]
) -> Result<T, TryGetError>
fn try_get_many( res: &QueryResult, pre: &str, cols: &[String] ) -> Result<T, TryGetError>
Get a tuple value from the query result with prefixed column name
source§fn try_get_many_by_index(res: &QueryResult) -> Result<T, TryGetError>
fn try_get_many_by_index(res: &QueryResult) -> Result<T, TryGetError>
Get a tuple value from the query result based on the order in the select expressions