Struct rustable::gatt::server::Characteristic[][src]

pub struct Characteristic { /* fields omitted */ }

Implementations

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 Descriptors in the service and returns then in an iterator.

Even if not all of the Characteristics 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]

pub fn set_notify_cb<C>(&mut self, cb: C) where
    C: FnMut() -> Pin<Box<dyn Future<Output = ShouldNotify> + Send>> + Send + Sync + 'static, 
[src]

Auto Trait Implementations

impl !RefUnwindSafe for Characteristic

impl Send for Characteristic

impl Sync for Characteristic

impl Unpin for Characteristic

impl !UnwindSafe for Characteristic

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.