Enum InputCapability
#[repr(u32)]pub enum InputCapability {
None = 1,
Confirmation = 2,
Keyboard = 3,
}
Expand description
Input Capabilities for pairing exchanges. These should be set based on the ability of the local system to enter responses to pairing requests. See Volume 3, Part C, Table 5.3 for more information.
Variants§
None = 1
There is no user input method available for responding ‘yes’ or ‘no’ to a pairing request. Note: setting this setting will mean most pairings are considered unauthenticated and vulnerable to machine-in-the-middle attacks.
Confirmation = 2
The user can respond yes or no to a request.
Keyboard = 3
The user has a keyboard (or other UI) where they can type a numerical code and signal they have finished or cancel.
Implementations§
§impl InputCapability
impl InputCapability
pub fn from_primitive(prim: u32) -> Option<InputCapability>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl Clone for InputCapability
impl Clone for InputCapability
§fn clone(&self) -> InputCapability
fn clone(&self) -> InputCapability
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 more§impl Debug for InputCapability
impl Debug for InputCapability
§impl<D> Decode<InputCapability, D> for InputCapabilitywhere
D: ResourceDialect,
impl<D> Decode<InputCapability, D> for InputCapabilitywhere
D: ResourceDialect,
§fn new_empty() -> InputCapability
fn new_empty() -> InputCapability
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<InputCapability, D> for InputCapabilitywhere
D: ResourceDialect,
impl<D> Encode<InputCapability, D> for InputCapabilitywhere
D: ResourceDialect,
§impl Hash for InputCapability
impl Hash for InputCapability
§impl Ord for InputCapability
impl Ord for InputCapability
§impl PartialEq for InputCapability
impl PartialEq for InputCapability
§impl PartialOrd for InputCapability
impl PartialOrd for InputCapability
§impl TypeMarker for InputCapability
impl TypeMarker for InputCapability
§type Owned = InputCapability
type Owned = InputCapability
The owned Rust type which this FIDL type decodes into.
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for InputCapability
impl ValueTypeMarker for InputCapability
§type Borrowed<'a> = InputCapability
type Borrowed<'a> = InputCapability
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<InputCapability as TypeMarker>::Owned,
) -> <InputCapability as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<InputCapability as TypeMarker>::Owned, ) -> <InputCapability as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for InputCapability
impl Eq for InputCapability
impl StructuralPartialEq for InputCapability
Auto Trait Implementations§
impl Freeze for InputCapability
impl RefUnwindSafe for InputCapability
impl Send for InputCapability
impl Sync for InputCapability
impl Unpin for InputCapability
impl UnwindSafe for InputCapability
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