pub struct ChangeHostFeature { /* private fields */ }Expand description
Implements the ChangeHost / 0x1814 feature.
Implementations§
Source§impl ChangeHostFeature
impl ChangeHostFeature
Sourcepub async fn get_host_info(&self) -> Result<ChangeHostInfo, Hidpp20Error>
pub async fn get_host_info(&self) -> Result<ChangeHostInfo, Hidpp20Error>
Retrieves the host count, current host and host-switching flags.
Sourcepub async fn set_current_host(&self, host: u8) -> Result<(), Hidpp20Error>
pub async fn set_current_host(&self, host: u8) -> Result<(), Hidpp20Error>
Selects host as the current host.
This is sent fire-and-forget: a successful switch usually resets the device, so no response is awaited. The device drops off the current host once it acts on the request.
Retrieves the persistent per-host cookie bytes.
host_count is the value from ChangeHostInfo::host_count; the device
returns one cookie byte per host and does not delimit the list.
Writes the persistent cookie byte for host.
Cookies are arbitrary software-defined bytes stored in the device’s non-volatile memory; the firmware clears a host’s cookie when a new host connects to that slot.
Trait Implementations§
Source§impl Clone for ChangeHostFeature
impl Clone for ChangeHostFeature
Source§fn clone(&self) -> ChangeHostFeature
fn clone(&self) -> ChangeHostFeature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CreatableFeature for ChangeHostFeature
impl CreatableFeature for ChangeHostFeature
Source§const STARTING_VERSION: u8 = 0
const STARTING_VERSION: u8 = 0
The version of the feature the implementation starts to support.
impl Feature for ChangeHostFeature
Auto Trait Implementations§
impl !RefUnwindSafe for ChangeHostFeature
impl !UnwindSafe for ChangeHostFeature
impl Freeze for ChangeHostFeature
impl Send for ChangeHostFeature
impl Sync for ChangeHostFeature
impl Unpin for ChangeHostFeature
impl UnsafeUnpin for ChangeHostFeature
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