pub struct ActivityConfig {
pub enable: bool,
pub threshold: u8,
pub duration: u8,
}Expand description
Activity/inactivity detection configuration (sleep-to-wake).
Fields§
§enable: boolEnable activity detection.
threshold: u8Activation threshold (0-127).
duration: u8Duration before sleep (0-255).
Implementations§
Source§impl ActivityConfig
impl ActivityConfig
Sourcepub const fn with_enable(self, enable: bool) -> Self
pub const fn with_enable(self, enable: bool) -> Self
Set enable state.
Sourcepub const fn with_threshold(self, threshold: u8) -> Self
pub const fn with_threshold(self, threshold: u8) -> Self
Set threshold (0-127).
Sourcepub const fn with_duration(self, duration: u8) -> Self
pub const fn with_duration(self, duration: u8) -> Self
Set duration (0-255).
Trait Implementations§
Source§impl Clone for ActivityConfig
impl Clone for ActivityConfig
Source§fn clone(&self) -> ActivityConfig
fn clone(&self) -> ActivityConfig
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 Debug for ActivityConfig
impl Debug for ActivityConfig
Source§impl Default for ActivityConfig
impl Default for ActivityConfig
Source§fn default() -> ActivityConfig
fn default() -> ActivityConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for ActivityConfig
impl PartialEq for ActivityConfig
impl Copy for ActivityConfig
impl Eq for ActivityConfig
impl StructuralPartialEq for ActivityConfig
Auto Trait Implementations§
impl Freeze for ActivityConfig
impl RefUnwindSafe for ActivityConfig
impl Send for ActivityConfig
impl Sync for ActivityConfig
impl Unpin for ActivityConfig
impl UnsafeUnpin for ActivityConfig
impl UnwindSafe for ActivityConfig
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