Struct Characteristic
pub struct Characteristic {
pub handle: Option<Handle>,
pub type_: Option<Uuid>,
pub properties: Option<CharacteristicPropertyBits>,
pub permissions: Option<AttributePermissions>,
pub descriptors: Option<Vec<Descriptor>>,
/* private fields */
}
Expand description
Represents a local or remote GATT characteristic.
Fields§
§handle: Option<Handle>
Uniquely identifies this characteristic within a service. For local characteristics, the specified handle must be unique across all characteristic and descriptor handles in this service.
Always present. For local characteristics, this value is mandatory.
type_: Option<Uuid>
The UUID that identifies the type of this characteristic. Always present. Mandatory for local characteristics.
properties: Option<CharacteristicPropertyBits>
The characteristic properties bitfield. Always present. Mandatory for local characteristics.
permissions: Option<AttributePermissions>
The attribute permissions of this characteristic. For remote characteristics, this value will not be present until the permissions are discovered via read and write requests.
For local characteristics, this value is mandatory.
descriptors: Option<Vec<Descriptor>>
The descriptors of this characteristic. Present only if non-empty. Optional for local characteristics.
Trait Implementations§
§impl Clone for Characteristic
impl Clone for Characteristic
§fn clone(&self) -> Characteristic
fn clone(&self) -> Characteristic
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for Characteristic
impl Debug for Characteristic
§impl<D> Decode<Characteristic, D> for Characteristicwhere
D: ResourceDialect,
impl<D> Decode<Characteristic, D> for Characteristicwhere
D: ResourceDialect,
§fn new_empty() -> Characteristic
fn new_empty() -> Characteristic
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for Characteristic
impl Default for Characteristic
§fn default() -> Characteristic
fn default() -> Characteristic
§impl<D> Encode<Characteristic, D> for &Characteristicwhere
D: ResourceDialect,
impl<D> Encode<Characteristic, D> for &Characteristicwhere
D: ResourceDialect,
§impl PartialEq for Characteristic
impl PartialEq for Characteristic
§impl TypeMarker for Characteristic
impl TypeMarker for Characteristic
§type Owned = Characteristic
type Owned = Characteristic
§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 Characteristic
impl ValueTypeMarker for Characteristic
§type Borrowed<'a> = &'a Characteristic
type Borrowed<'a> = &'a Characteristic
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<Characteristic as TypeMarker>::Owned,
) -> <Characteristic as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<Characteristic as TypeMarker>::Owned, ) -> <Characteristic as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.