Struct rustable::gatt::server::Characteristic [−][src]
pub struct Characteristic { /* fields omitted */ }
Implementations
impl Characteristic
[src]
impl Characteristic
[src]pub fn new(uuid: UUID, flags: CharFlags) -> Self
[src]
pub fn set_handle(&mut self, handle: Option<NonZeroU16>)
[src]
pub fn set_value(&mut self, value: ValOrFn)
[src]
pub fn uuid(&self) -> UUID
[src]
Get the UUID
of the Characteristic
.
pub fn add_desc(&mut self, desc: Descriptor)
[src]
pub fn remove_desc(&mut self, uuid: UUID) -> Option<Descriptor>
[src]
pub fn drain_descs(&mut self) -> Drain<'_, Descriptor>
[src]
Removes all of the Descriptor
s in the service and returns then in an iterator.
Even if not all of the Characteristic
s are not consumed, they are still removed.
pub fn desc_cnt(&self) -> usize
[src]
pub fn set_write_cb<C: FnMut(AttValue) -> (Option<ValOrFn>, bool) + Send + Sync + 'static>(
&mut self,
cb: C
)
[src]
&mut self,
cb: C
)
pub fn set_notify_cb<C>(&mut self, cb: C) where
C: FnMut() -> Pin<Box<dyn Future<Output = ShouldNotify> + Send>> + Send + Sync + 'static,
[src]
C: FnMut() -> Pin<Box<dyn Future<Output = ShouldNotify> + Send>> + Send + Sync + 'static,