pub enum SwitchEvent {
LidOpened,
LidClosed,
ConvertedToLaptop,
ConvertedToTablet,
}
Expand description
An event generated by a switch.
Variants§
LidOpened
The lid of the device (usually a laptop) has been opened.
This is the default state.
LidClosed
The lid of the device (usually a laptop) has been closed.
If the device is already in this state when the device is discovered, a synthetic event of this kind is generated.
ConvertedToLaptop
The device has been converted from tablet to laptop mode.
This is the default state.
ConvertedToTablet
The device has been converted from laptop to tablet mode.
If the device is already in this state when the device is discovered, a synthetic event of this kind is generated.
Trait Implementations§
Source§impl Clone for SwitchEvent
impl Clone for SwitchEvent
Source§fn clone(&self) -> SwitchEvent
fn clone(&self) -> SwitchEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SwitchEvent
impl Debug for SwitchEvent
Source§impl<'de> Deserialize<'de> for SwitchEvent
impl<'de> Deserialize<'de> for SwitchEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SwitchEvent
impl Hash for SwitchEvent
Source§impl PartialEq for SwitchEvent
impl PartialEq for SwitchEvent
Source§impl Serialize for SwitchEvent
impl Serialize for SwitchEvent
impl Copy for SwitchEvent
impl Eq for SwitchEvent
impl StructuralPartialEq for SwitchEvent
Auto Trait Implementations§
impl Freeze for SwitchEvent
impl RefUnwindSafe for SwitchEvent
impl Send for SwitchEvent
impl Sync for SwitchEvent
impl Unpin for SwitchEvent
impl UnwindSafe for SwitchEvent
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