#[repr(u32)]pub enum ServiceKind {
Primary = 1,
Secondary = 2,
}
Expand description
The kind (“type”) of a GATT Service as outlined in Bluetooth Core Spec v5.3 Vol. 1 Part A 6.5.1.
Variants§
Primary = 1
A “service that provides functionality of a device that can be used on its own” (Ibid)
Secondary = 2
A “service that provides additional functionality […] in association with a primary service and is included from at least one primary service” (Ibid)
Implementations§
Source§impl ServiceKind
impl ServiceKind
pub fn from_primitive(prim: u32) -> Option<Self>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
Source§impl Clone for ServiceKind
impl Clone for ServiceKind
Source§fn clone(&self) -> ServiceKind
fn clone(&self) -> ServiceKind
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 ServiceKind
impl Debug for ServiceKind
Source§impl<D: ResourceDialect> Decode<ServiceKind, D> for ServiceKind
impl<D: ResourceDialect> Decode<ServiceKind, D> for ServiceKind
Source§impl<D: ResourceDialect> Encode<ServiceKind, D> for ServiceKind
impl<D: ResourceDialect> Encode<ServiceKind, D> for ServiceKind
Source§impl Hash for ServiceKind
impl Hash for ServiceKind
Source§impl Ord for ServiceKind
impl Ord for ServiceKind
Source§fn cmp(&self, other: &ServiceKind) -> Ordering
fn cmp(&self, other: &ServiceKind) -> 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 ServiceKind
impl PartialEq for ServiceKind
Source§impl PartialOrd for ServiceKind
impl PartialOrd for ServiceKind
Source§impl TypeMarker for ServiceKind
impl TypeMarker for ServiceKind
Source§type Owned = ServiceKind
type Owned = ServiceKind
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 ServiceKind
impl ValueTypeMarker for ServiceKind
Source§type Borrowed<'a> = ServiceKind
type Borrowed<'a> = ServiceKind
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 ServiceKind
impl Eq for ServiceKind
impl StructuralPartialEq for ServiceKind
Auto Trait Implementations§
impl Freeze for ServiceKind
impl RefUnwindSafe for ServiceKind
impl Send for ServiceKind
impl Sync for ServiceKind
impl Unpin for ServiceKind
impl UnwindSafe for ServiceKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)