pub enum Event {
Searching,
Connected {
name: String,
battery: Option<u8>,
},
Packet(Packet),
Disconnected,
Error(String),
}Expand description
What a connection to a controller reports.
The background task started by ble::events sends these. The type needs no Bluetooth
itself, so another transport, such as a web page using Web Bluetooth, can send the same.
Variants§
Searching
Looking for a controller. Sent once each time a search begins.
Connected
Connected and receiving data.
Packet(Packet)
A data packet.
Disconnected
The connection was lost. A new search follows.
Error(String)
Something went wrong. The task keeps trying.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Event
impl Freeze for Event
impl Move for Event
impl RefUnwindSafe for Event
impl Send for Eventwhere
RawVecInner: Send,
impl Sync for Eventwhere
RawVecInner: Sync,
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Eventwhere
RawVecInner: UnwindSafe,
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