pub struct LedDevice {
pub name: String,
pub alias: String,
/* private fields */
}Fields§
§name: String§alias: StringTrait Implementations§
Source§impl Device for LedDevice
impl Device for LedDevice
fn new( name: &str, alias: &str, peripheral: Option<Peripheral>, write_char: Option<Characteristic>, read_char: Option<Characteristic>, ) -> Self
fn peripheral(&self) -> Option<&Peripheral>
fn write_char(&self) -> Option<&Characteristic>
fn read_char(&self) -> Option<&Characteristic>
fn default_write_characteristic_uuid(&self) -> Uuid
fn set_name(&mut self, name: &str)
fn set_peripheral(&mut self, peripheral: Peripheral)
Source§fn set_write_char(&mut self, characteristic: &Characteristic)
fn set_write_char(&mut self, characteristic: &Characteristic)
Allows to set the default characteristic (Write or Read),
per-device by providing the
Characteristic. Read moreSource§fn characteristics(&self) -> Option<Vec<Characteristic>>
fn characteristics(&self) -> Option<Vec<Characteristic>>
Return all the discovered device characteristic. Read more
Source§fn characteristics_by_type(
&self,
kinds: BitFlags<OpKind>,
) -> Option<Vec<Characteristic>>
fn characteristics_by_type( &self, kinds: BitFlags<OpKind>, ) -> Option<Vec<Characteristic>>
Return all the discovered device characteristic and allows
to filter them by type Read more
Source§fn set_char(
&mut self,
char_kind: &CharKind,
uuid_kind: &UuidKind,
) -> Result<(), BluetoothError>
fn set_char( &mut self, char_kind: &CharKind, uuid_kind: &UuidKind, ) -> Result<(), BluetoothError>
Allows to set the default characteristic (Write or Read),
per-device by providing the
UuidKind of the characteristic. Read morefn set_char_with_uuid( &mut self, char_kind: &CharKind, uuid: &Uuid, ) -> Result<(), BluetoothError>
fn set_char_with_u16( &mut self, char_kind: &CharKind, u16: u16, ) -> Result<(), BluetoothError>
fn set_char_with_u32( &mut self, char_kind: &CharKind, u32: u32, ) -> Result<(), BluetoothError>
Auto Trait Implementations§
impl Freeze for LedDevice
impl !RefUnwindSafe for LedDevice
impl Send for LedDevice
impl Sync for LedDevice
impl Unpin for LedDevice
impl !UnwindSafe for LedDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more