#[repr(i32)]pub enum UsernameAvailability {
Unspecified = 0,
UsernameAvailable = 1,
UsernameCurrent = 2,
UsernameTaken = 3,
UsernameReserved = 4,
UsernameInvalid = 5,
}Variants§
Unspecified = 0
UsernameAvailable = 1
UsernameCurrent = 2
UsernameTaken = 3
UsernameReserved = 4
UsernameInvalid = 5
Implementations§
Source§impl UsernameAvailability
impl UsernameAvailability
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of UsernameAvailability.
Sourcepub fn from_i32(value: i32) -> Option<UsernameAvailability>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<UsernameAvailability>
Use the TryFrom<i32> implementation instead
Converts an i32 to a UsernameAvailability, or None if value is not a valid variant.
Source§impl UsernameAvailability
impl UsernameAvailability
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<UsernameAvailability>
pub fn from_str_name(value: &str) -> Option<UsernameAvailability>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for UsernameAvailability
impl Clone for UsernameAvailability
Source§fn clone(&self) -> UsernameAvailability
fn clone(&self) -> UsernameAvailability
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UsernameAvailability
Source§impl Debug for UsernameAvailability
impl Debug for UsernameAvailability
Source§impl Default for UsernameAvailability
impl Default for UsernameAvailability
Source§fn default() -> UsernameAvailability
fn default() -> UsernameAvailability
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for UsernameAvailability
impl<'de> Deserialize<'de> for UsernameAvailability
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<UsernameAvailability, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<UsernameAvailability, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for UsernameAvailability
Source§impl Hash for UsernameAvailability
impl Hash for UsernameAvailability
Source§impl Ord for UsernameAvailability
impl Ord for UsernameAvailability
Source§fn cmp(&self, other: &UsernameAvailability) -> Ordering
fn cmp(&self, other: &UsernameAvailability) -> Ordering
1.21.0 (const: unstable) · 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 for UsernameAvailability
impl PartialEq for UsernameAvailability
Source§fn eq(&self, other: &UsernameAvailability) -> bool
fn eq(&self, other: &UsernameAvailability) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for UsernameAvailability
impl PartialOrd for UsernameAvailability
Source§impl Serialize for UsernameAvailability
impl Serialize for UsernameAvailability
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for UsernameAvailability
Source§impl TryFrom<i32> for UsernameAvailability
impl TryFrom<i32> for UsernameAvailability
Source§type Error = DecodeError
type Error = DecodeError
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<UsernameAvailability, DecodeError>
fn try_from(value: i32) -> Result<UsernameAvailability, DecodeError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for UsernameAvailability
impl RefUnwindSafe for UsernameAvailability
impl Send for UsernameAvailability
impl Sync for UsernameAvailability
impl Unpin for UsernameAvailability
impl UnsafeUnpin for UsernameAvailability
impl UnwindSafe for UsernameAvailability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more