Struct AddDescriptorParameters

Source
pub struct AddDescriptorParameters<'a> {
    pub service_handle: AttributeHandle,
    pub characteristic_handle: AttributeHandle,
    pub descriptor_uuid: Uuid,
    pub descriptor_value_max_len: usize,
    pub descriptor_value: &'a [u8],
    pub security_permissions: DescriptorPermission,
    pub access_permissions: AccessPermission,
    pub gatt_event_mask: CharacteristicEvent,
    pub encryption_key_size: EncryptionKeySize,
    pub is_variable: bool,
}
Expand description

Parameters for the GATT Add Characteristic Descriptor command.

Fields§

§service_handle: AttributeHandle

Handle of the service to which characteristic belongs.

§characteristic_handle: AttributeHandle

Handle of the characteristic to which description is to be added.

§descriptor_uuid: Uuid

UUID of the characteristic descriptor.

See KnownDescriptor for some useful descriptors. This value is not restricted to the known descriptors, however.

§descriptor_value_max_len: usize

The maximum length of the descriptor value.

§descriptor_value: &'a [u8]

Current Length of the characteristic descriptor value.

§security_permissions: DescriptorPermission

What security requirements must be met before the descriptor can be accessed.

§access_permissions: AccessPermission

What types of access are allowed for the descriptor.

§gatt_event_mask: CharacteristicEvent

Which types of events will be generated when the attribute is accessed.

§encryption_key_size: EncryptionKeySize

The minimum encryption key size requirement for this attribute.

§is_variable: bool

If true, the attribute has a variable length value field. Otherwise, the value field length is fixed.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.