pub struct PowerManagerExtApi<P: CheckedPermissions> { /* private fields */ }Implementations§
Source§impl<P: CheckedPermissions> PowerManagerExtApi<P>
impl<P: CheckedPermissions> PowerManagerExtApi<P>
pub fn status(&self) -> Result<Status, Error>where
P: MessageAllowed<GetStatus>,
pub fn extended_status(&self) -> Option<ExtendedStatus>where
P: MessageAllowed<GetExtendedStatus>,
pub fn set_usb_boost(&self, enabled: bool) -> Result<SetUsbBoostResponse, Error>where
P: MessageAllowed<SetUsbBoost>,
pub fn set_battery_percent(&self, level: u8) -> Result<(), Error>where
P: MessageAllowed<SetBatteryPercent>,
pub fn subscribe_status<S>(&self, context: &mut ServerContext<S>)where
S: Server + ScalarEventHandler<Status>,
P: MessageAllowed<StatusSubscribe>,
Trait Implementations§
Source§impl<P: Clone + CheckedPermissions> Clone for PowerManagerExtApi<P>
impl<P: Clone + CheckedPermissions> Clone for PowerManagerExtApi<P>
Source§fn clone(&self) -> PowerManagerExtApi<P>
fn clone(&self) -> PowerManagerExtApi<P>
Returns a duplicate 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<P: Default + CheckedPermissions> Default for PowerManagerExtApi<P>
impl<P: Default + CheckedPermissions> Default for PowerManagerExtApi<P>
Source§fn default() -> PowerManagerExtApi<P>
fn default() -> PowerManagerExtApi<P>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<P> Freeze for PowerManagerExtApi<P>
impl<P> RefUnwindSafe for PowerManagerExtApi<P>
impl<P> Send for PowerManagerExtApi<P>
impl<P> Sync for PowerManagerExtApi<P>
impl<P> Unpin for PowerManagerExtApi<P>
impl<P> UnwindSafe for PowerManagerExtApi<P>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.