[][src]Struct i3status_rs::blocks::bluetooth::BluetoothDevice

pub struct BluetoothDevice {
    pub path: String,
    pub icon: Option<String>,
    pub label: String,
    con: Connection,
    available: Arc<Mutex<bool>>,
}

Fields

path: Stringicon: Option<String>label: Stringcon: Connectionavailable: Arc<Mutex<bool>>

Implementations

impl BluetoothDevice[src]

pub fn new(mac: String, label: Option<String>) -> Result<Self, Error>[src]

pub fn battery(&self) -> Option<u8>[src]

pub fn icon(&self) -> Option<String>[src]

pub fn available(&self) -> Result<bool, Error>[src]

pub fn connected(&self) -> bool[src]

pub fn toggle(&self) -> Result<(), Error>[src]

pub fn monitor(&self, id: usize, update_request: Sender<Task>)[src]

Monitor Bluetooth property changes in a separate thread and send updates via the update_request channel.

Auto Trait Implementations

impl !RefUnwindSafe for BluetoothDevice[src]

impl !Send for BluetoothDevice[src]

impl !Sync for BluetoothDevice[src]

impl Unpin for BluetoothDevice[src]

impl !UnwindSafe for BluetoothDevice[src]

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.