#[repr(u8)]
pub enum Role {
None,
User,
Admin,
}
Variants
None
User
Admin
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Role
impl<'de> Deserialize<'de> for Role
sourcefn 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
sourceimpl EnumMessage for Role
impl EnumMessage for Role
fn get_message(&self) -> Option<&'static str>
fn get_detailed_message(&self) -> Option<&'static str>
fn get_serializations(&self) -> &'static [&'static str]
sourceimpl EnumSetTypePrivate for Role
impl EnumSetTypePrivate for Role
sourcefn enum_into_u32(self) -> u32
fn enum_into_u32(self) -> u32
Converts an enum of this type into its bit position.
sourceunsafe fn enum_from_u32(val: u32) -> Self
unsafe fn enum_from_u32(val: u32) -> Self
Converts a bit position into an enum value.
sourcefn serialize<S: Serializer>(
set: EnumSet<Role>,
ser: S
) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>(
set: EnumSet<Role>,
ser: S
) -> Result<S::Ok, S::Error>
Serializes the EnumSet
. Read more
sourcefn deserialize<'de, D: Deserializer<'de>>(
de: D
) -> Result<EnumSet<Role>, D::Error>
fn deserialize<'de, D: Deserializer<'de>>(
de: D
) -> Result<EnumSet<Role>, D::Error>
Deserializes the EnumSet
.
sourceimpl IntoEnumIterator for Role
impl IntoEnumIterator for Role
sourceimpl PartialOrd<Role> for Role
impl PartialOrd<Role> for Role
sourcefn partial_cmp(&self, other: &Role) -> Option<Ordering>
fn partial_cmp(&self, other: &Role) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl TryFrom<u8> for Role
impl TryFrom<u8> for Role
type Error = TryFromPrimitiveError<Self>
type Error = TryFromPrimitiveError<Self>
The type returned in the event of a conversion error.
sourcefn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for Role
impl TryFromPrimitive for Role
type Primitive = u8
const NAME: &'static str
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for Role
impl EnumSetType for Role
impl Eq for Role
Auto Trait Implementations
impl RefUnwindSafe for Role
impl Send for Role
impl Sync for Role
impl Unpin for Role
impl UnwindSafe for Role
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more