Enum rustable::gatt::ValOrFn[][src]

pub enum ValOrFn {
    Value(AttValue),
    Function(Box<dyn FnMut() -> AttValue + Send + Sync + 'static>),
}

Use to set the value of a local characteristic or descriptor. The value can be an actual value or it can be callback that returns value.

Variants

Value(AttValue)
Function(Box<dyn FnMut() -> AttValue + Send + Sync + 'static>)

Implementations

impl ValOrFn[src]

pub fn to_value(&mut self) -> AttValue[src]

pub fn from_slice(slice: &[u8]) -> Self[src]

Trait Implementations

impl Debug for ValOrFn[src]

impl Default for ValOrFn[src]

Auto Trait Implementations

impl !RefUnwindSafe for ValOrFn

impl Send for ValOrFn

impl Sync for ValOrFn

impl Unpin for ValOrFn

impl !UnwindSafe for ValOrFn

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.