#[repr(i32)]pub enum BluetoothDeviceRequestType {
Connect = 0,
Disconnect = 1,
Pair = 2,
Unpair = 3,
ConnectV3WithCache = 4,
ConnectV3WithoutCache = 5,
ClearCache = 6,
}
Variants§
Connect = 0
Disconnect = 1
Pair = 2
Unpair = 3
ConnectV3WithCache = 4
ConnectV3WithoutCache = 5
ClearCache = 6
Implementations§
Source§impl BluetoothDeviceRequestType
impl BluetoothDeviceRequestType
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of BluetoothDeviceRequestType
.
Sourcepub fn from_i32(value: i32) -> Option<BluetoothDeviceRequestType>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<BluetoothDeviceRequestType>
Converts an i32
to a BluetoothDeviceRequestType
, or None
if value
is not a valid variant.
Source§impl BluetoothDeviceRequestType
impl BluetoothDeviceRequestType
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<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for BluetoothDeviceRequestType
impl Clone for BluetoothDeviceRequestType
Source§fn clone(&self) -> BluetoothDeviceRequestType
fn clone(&self) -> BluetoothDeviceRequestType
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BluetoothDeviceRequestType
impl Debug for BluetoothDeviceRequestType
Source§impl Default for BluetoothDeviceRequestType
impl Default for BluetoothDeviceRequestType
Source§fn default() -> BluetoothDeviceRequestType
fn default() -> BluetoothDeviceRequestType
Returns the “default value” for a type. Read more
Source§impl From<BluetoothDeviceRequestType> for i32
impl From<BluetoothDeviceRequestType> for i32
Source§fn from(value: BluetoothDeviceRequestType) -> i32
fn from(value: BluetoothDeviceRequestType) -> i32
Converts to this type from the input type.
Source§impl Hash for BluetoothDeviceRequestType
impl Hash for BluetoothDeviceRequestType
Source§impl Ord for BluetoothDeviceRequestType
impl Ord for BluetoothDeviceRequestType
Source§fn cmp(&self, other: &BluetoothDeviceRequestType) -> Ordering
fn cmp(&self, other: &BluetoothDeviceRequestType) -> 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 for BluetoothDeviceRequestType
impl PartialEq for BluetoothDeviceRequestType
Source§fn eq(&self, other: &BluetoothDeviceRequestType) -> bool
fn eq(&self, other: &BluetoothDeviceRequestType) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl PartialOrd for BluetoothDeviceRequestType
impl PartialOrd for BluetoothDeviceRequestType
Source§impl TryFrom<i32> for BluetoothDeviceRequestType
impl TryFrom<i32> for BluetoothDeviceRequestType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<BluetoothDeviceRequestType, UnknownEnumValue>
fn try_from(value: i32) -> Result<BluetoothDeviceRequestType, UnknownEnumValue>
Performs the conversion.
impl Copy for BluetoothDeviceRequestType
impl Eq for BluetoothDeviceRequestType
impl StructuralPartialEq for BluetoothDeviceRequestType
Auto Trait Implementations§
impl Freeze for BluetoothDeviceRequestType
impl RefUnwindSafe for BluetoothDeviceRequestType
impl Send for BluetoothDeviceRequestType
impl Sync for BluetoothDeviceRequestType
impl Unpin for BluetoothDeviceRequestType
impl UnwindSafe for BluetoothDeviceRequestType
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