pub enum BleGattCharFlag {
Show 18 variants
Broadcast,
Read,
WriteNoRsp,
Write,
Notify,
Indicate,
AuthSignWrite,
ReliableWrite,
AuxWrite,
ReadEnc,
ReadAuthen,
ReadAuthor,
WriteEnc,
WriteAuthen,
WriteAuthor,
NotifyIndicateEnc,
NotifyIndicateAuthen,
NotifyIndicateAuthor,
}Expand description
A GATT characteristic operation / permission flag (BLE_GATT_CHR_F_*).
The operation flags become the property bits of the characteristic declaration (and gate what
the ATT server lets a peer do); the *Enc / *Authen / *Author flags additionally demand a
security level before the access is dispatched to the
gatts_subscribe hook.
Variants§
Broadcast
The value may be broadcast (sets the Broadcast property bit).
Read
The peer may read the value.
WriteNoRsp
The peer may write the value without a response (ATT Write Command). Independent of
Write — a peer cannot use write-without-response unless this flag is set —
but both kinds of write arrive as the same
GattsEvent::Write, as NimBLE does not report which ATT
opcode carried them.
Write
The peer may write the value with a response (ATT Write Request).
Notify
The value may be notified (unacknowledged). NimBLE adds the CCCD for you.
Indicate
The value may be indicated (acknowledged). NimBLE adds the CCCD for you.
AuthSignWrite
The peer may write the value with a signature (ATT Signed Write Command).
ReliableWrite
Sets the “Reliable Write” extended property (prepare/execute writes). The queued writes are
coalesced by NimBLE and delivered as a single Write.
AuxWrite
Sets the “Writable Auxiliaries” extended property (the Characteristic User Description descriptor is writable).
ReadEnc
Reads require an encrypted link.
ReadAuthen
Reads require an encrypted link from an authenticated (MITM-protected) pairing.
ReadAuthor
Reads require authorization.
Not usable yet: NimBLE asks the application to authorize the access through the
BLE_GAP_EVENT_AUTHORIZE GAP event, which this crate does not surface (it arrives as
GapEvent::Other, whose response cannot be set), and
NimBLE rejects an unanswered request — so setting this flag currently fails every read with
“insufficient authorization”.
WriteEnc
Writes require an encrypted link.
WriteAuthen
Writes require an encrypted link from an authenticated (MITM-protected) pairing.
WriteAuthor
Writes require authorization. Carries the same caveat as ReadAuthor.
NotifyIndicateEnc
Subscribing (writing the CCCD) requires an encrypted link.
NotifyIndicateAuthen
Subscribing (writing the CCCD) requires an encrypted link from an authenticated (MITM-protected) pairing.
NotifyIndicateAuthor
Subscribing (writing the CCCD) requires authorization. Carries the same caveat as
ReadAuthor.
Implementations§
Source§impl BleGattCharFlag
impl BleGattCharFlag
Sourcepub const fn repr(self) -> ble_gatt_chr_flags
pub const fn repr(self) -> ble_gatt_chr_flags
The raw NimBLE flag bit (BLE_GATT_CHR_F_*). const, so it can be used to build a static
service table (see the gatt_services! macro).
Trait Implementations§
Source§impl<O: Into<EnumSet<BleGattCharFlag>>> BitAnd<O> for BleGattCharFlag
impl<O: Into<EnumSet<BleGattCharFlag>>> BitAnd<O> for BleGattCharFlag
Source§impl<O: Into<EnumSet<BleGattCharFlag>>> BitOr<O> for BleGattCharFlag
impl<O: Into<EnumSet<BleGattCharFlag>>> BitOr<O> for BleGattCharFlag
Source§impl<O: Into<EnumSet<BleGattCharFlag>>> BitXor<O> for BleGattCharFlag
impl<O: Into<EnumSet<BleGattCharFlag>>> BitXor<O> for BleGattCharFlag
Source§impl Clone for BleGattCharFlag
impl Clone for BleGattCharFlag
impl Copy for BleGattCharFlag
Source§impl Debug for BleGattCharFlag
impl Debug for BleGattCharFlag
Source§impl EnumSetConstHelper for BleGattCharFlag
impl EnumSetConstHelper for BleGattCharFlag
Source§const CONST_INIT_HELPER: __EnumSetInitHelper = __EnumSetInitHelper
const CONST_INIT_HELPER: __EnumSetInitHelper = __EnumSetInitHelper
ConstInitHelper.Source§const CONST_OP_HELPER: __EnumSetOpHelper = __EnumSetOpHelper
const CONST_OP_HELPER: __EnumSetOpHelper = __EnumSetOpHelper
ConstOpHelper.Source§type ConstInitHelper = __EnumSetInitHelper
type ConstInitHelper = __EnumSetInitHelper
Source§type ConstOpHelper = __EnumSetOpHelper
type ConstOpHelper = __EnumSetOpHelper
impl EnumSetType for BleGattCharFlag
Source§impl EnumSetTypePrivate for BleGattCharFlag
impl EnumSetTypePrivate for BleGattCharFlag
Source§const VARIANT_COUNT: u32 = 18u32
const VARIANT_COUNT: u32 = 18u32
Source§fn enum_into_u32(self) -> u32
fn enum_into_u32(self) -> u32
Source§unsafe fn enum_from_u32(val: u32) -> Self
unsafe fn enum_from_u32(val: u32) -> Self
Source§unsafe fn enum_from_u32_checked(val: u32) -> Self
unsafe fn enum_from_u32_checked(val: u32) -> Self
impl Eq for BleGattCharFlag
Source§impl From<BleGattCharFlag> for ble_gatt_chr_flags
Available on esp_idf_bt_nimble_gatt_server only.
impl From<BleGattCharFlag> for ble_gatt_chr_flags
esp_idf_bt_nimble_gatt_server only.Source§fn from(flag: BleGattCharFlag) -> Self
fn from(flag: BleGattCharFlag) -> Self
Source§impl Not for BleGattCharFlag
impl Not for BleGattCharFlag
Source§impl PartialEq for BleGattCharFlag
impl PartialEq for BleGattCharFlag
Source§impl PartialEq<EnumSet<BleGattCharFlag>> for BleGattCharFlag
impl PartialEq<EnumSet<BleGattCharFlag>> for BleGattCharFlag
Source§impl<O: Into<EnumSet<BleGattCharFlag>>> Sub<O> for BleGattCharFlag
impl<O: Into<EnumSet<BleGattCharFlag>>> Sub<O> for BleGattCharFlag
Auto Trait Implementations§
impl Freeze for BleGattCharFlag
impl RefUnwindSafe for BleGattCharFlag
impl Send for BleGattCharFlag
impl Sync for BleGattCharFlag
impl Unpin for BleGattCharFlag
impl UnsafeUnpin for BleGattCharFlag
impl UnwindSafe for BleGattCharFlag
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)