Struct ServiceInfo
pub struct ServiceInfo {
pub handle: Option<ServiceHandle>,
pub kind: Option<ServiceKind>,
pub type_: Option<Uuid>,
pub characteristics: Option<Vec<Characteristic>>,
pub includes: Option<Vec<ServiceHandle>>,
/* private fields */
}
Expand description
Represents a local or remote GATT service.
Fields§
§handle: Option<ServiceHandle>
Unique identifier for this GATT service.
Always present if this represents a remote service, in which case this is unique across the
Client that returned this ServiceInfo.
Required for local services, in which case this must be unique across all services published
to a single Server instance. Can be used in the ServiceInfo.includes
of other
PublishService calls to the Server where this service is published.
kind: Option<ServiceKind>
Indicates whether this is a primary or secondary service. Always present for remote services. Optional for local services Default: ServiceKind::PRIMARY
type_: Option<Uuid>
The UUID that identifies the type of this service. There may be multiple services with the same UUID. Always present for remote services. Required for local services.
characteristics: Option<Vec<Characteristic>>
The characteristics of this service. Required for local services. Never present for remote services.
includes: Option<Vec<ServiceHandle>>
Handles of other services that are included by this service. Optional for local services. Never present for remote services. TODO(https://fxbug.dev/42147529): This is not currently supported for local services.
Trait Implementations§
§impl Clone for ServiceInfo
impl Clone for ServiceInfo
§fn clone(&self) -> ServiceInfo
fn clone(&self) -> ServiceInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for ServiceInfo
impl Debug for ServiceInfo
§impl<D> Decode<ServiceInfo, D> for ServiceInfowhere
D: ResourceDialect,
impl<D> Decode<ServiceInfo, D> for ServiceInfowhere
D: ResourceDialect,
§fn new_empty() -> ServiceInfo
fn new_empty() -> ServiceInfo
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for ServiceInfo
impl Default for ServiceInfo
§fn default() -> ServiceInfo
fn default() -> ServiceInfo
§impl<D> Encode<ServiceInfo, D> for &ServiceInfowhere
D: ResourceDialect,
impl<D> Encode<ServiceInfo, D> for &ServiceInfowhere
D: ResourceDialect,
§impl PartialEq for ServiceInfo
impl PartialEq for ServiceInfo
§impl TypeMarker for ServiceInfo
impl TypeMarker for ServiceInfo
§type Owned = ServiceInfo
type Owned = ServiceInfo
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
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
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 ServiceInfo
impl ValueTypeMarker for ServiceInfo
§type Borrowed<'a> = &'a ServiceInfo
type Borrowed<'a> = &'a ServiceInfo
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<ServiceInfo as TypeMarker>::Owned,
) -> <ServiceInfo as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<ServiceInfo as TypeMarker>::Owned, ) -> <ServiceInfo as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.