pub struct CrownFeature { /* private fields */ }Expand description
Implements the Crown / 0x4600 feature.
Implementations§
Source§impl CrownFeature
impl CrownFeature
Sourcepub async fn get_info(&self) -> Result<CrownInfo, Hidpp20Error>
pub async fn get_info(&self) -> Result<CrownInfo, Hidpp20Error>
Retrieves the crown’s capabilities and slot/ratchet counts.
Sourcepub async fn get_mode(&self) -> Result<CrownMode, Hidpp20Error>
pub async fn get_mode(&self) -> Result<CrownMode, Hidpp20Error>
Retrieves the crown’s current mode.
Sourcepub async fn set_mode(
&self,
mode: SetCrownMode,
) -> Result<CrownMode, Hidpp20Error>
pub async fn set_mode( &self, mode: SetCrownMode, ) -> Result<CrownMode, Hidpp20Error>
Sets the crown’s mode and returns the resulting mode echoed by the device.
Divert the crown (ReportingMode::Diverted) for CrownEvents to be
emitted.
Trait Implementations§
Source§impl CreatableFeature for CrownFeature
impl CreatableFeature for CrownFeature
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
Source§impl EmittingFeature<CrownEvent> for CrownFeature
impl EmittingFeature<CrownEvent> for CrownFeature
Source§fn listen(&self) -> Receiver<CrownEvent>
fn listen(&self) -> Receiver<CrownEvent>
Creates a receiver that is being notified whenever a new event of type
T is emitted by the feature.impl Feature for CrownFeature
Auto Trait Implementations§
impl !RefUnwindSafe for CrownFeature
impl !UnwindSafe for CrownFeature
impl Freeze for CrownFeature
impl Send for CrownFeature
impl Sync for CrownFeature
impl Unpin for CrownFeature
impl UnsafeUnpin for CrownFeature
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