#[repr(u16)]pub enum ProtocolIdentifier {
Show 14 variants
Sdp = 1,
Rfcomm = 3,
Att = 7,
Obex = 8,
Bnep = 15,
Hidp = 17,
HardcopyControlChannel = 18,
HardcopyDataChannel = 20,
HardcopyNotification = 22,
Avctp = 23,
Avdtp = 25,
McapControlChannel = 30,
McapDataChannel = 31,
L2Cap = 256,
}
Expand description
Defined Protocol Identifiers for the Protocol Descriptor We intentionally omit deprecated profile identifiers. From Bluetooth Assigned Numbers: https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
Variants§
Sdp = 1
Rfcomm = 3
Att = 7
Obex = 8
Bnep = 15
Hidp = 17
HardcopyControlChannel = 18
HardcopyDataChannel = 20
HardcopyNotification = 22
Avctp = 23
Avdtp = 25
McapControlChannel = 30
McapDataChannel = 31
L2Cap = 256
Implementations§
source§impl ProtocolIdentifier
impl ProtocolIdentifier
pub fn from_primitive(prim: u16) -> Option<Self>
pub const fn into_primitive(self) -> u16
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
source§impl Clone for ProtocolIdentifier
impl Clone for ProtocolIdentifier
source§fn clone(&self) -> ProtocolIdentifier
fn clone(&self) -> ProtocolIdentifier
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 ProtocolIdentifier
impl Debug for ProtocolIdentifier
source§impl Decode<ProtocolIdentifier> for ProtocolIdentifier
impl Decode<ProtocolIdentifier> for ProtocolIdentifier
source§impl Encode<ProtocolIdentifier> for ProtocolIdentifier
impl Encode<ProtocolIdentifier> for ProtocolIdentifier
source§impl Hash for ProtocolIdentifier
impl Hash for ProtocolIdentifier
source§impl Ord for ProtocolIdentifier
impl Ord for ProtocolIdentifier
source§fn cmp(&self, other: &ProtocolIdentifier) -> Ordering
fn cmp(&self, other: &ProtocolIdentifier) -> 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 ProtocolIdentifier
impl PartialEq for ProtocolIdentifier
source§fn eq(&self, other: &ProtocolIdentifier) -> bool
fn eq(&self, other: &ProtocolIdentifier) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ProtocolIdentifier
impl PartialOrd for ProtocolIdentifier
source§fn partial_cmp(&self, other: &ProtocolIdentifier) -> Option<Ordering>
fn partial_cmp(&self, other: &ProtocolIdentifier) -> 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 TypeMarker for ProtocolIdentifier
impl TypeMarker for ProtocolIdentifier
§type Owned = ProtocolIdentifier
type Owned = ProtocolIdentifier
The owned Rust type which this FIDL type decodes into.
source§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.
source§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
.source§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 moresource§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.source§impl ValueTypeMarker for ProtocolIdentifier
impl ValueTypeMarker for ProtocolIdentifier
§type Borrowed<'a> = ProtocolIdentifier
type Borrowed<'a> = ProtocolIdentifier
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Copy for ProtocolIdentifier
impl Eq for ProtocolIdentifier
impl StructuralPartialEq for ProtocolIdentifier
Auto Trait Implementations§
impl Freeze for ProtocolIdentifier
impl RefUnwindSafe for ProtocolIdentifier
impl Send for ProtocolIdentifier
impl Sync for ProtocolIdentifier
impl Unpin for ProtocolIdentifier
impl UnwindSafe for ProtocolIdentifier
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