pub struct IdleOptionsBuilder { /* private fields */ }
Expand description
Builder for IdleOptions
.
Implementations§
Source§impl IdleOptionsBuilder
impl IdleOptionsBuilder
Sourcepub fn disable_idle(&mut self, disable_idle: bool) -> &mut Self
pub fn disable_idle(&mut self, disable_idle: bool) -> &mut Self
If set to true
, disables the idle timeout functionality.
Sourcepub fn disable_default_idle_callback(
&mut self,
disable_default_idle_callback: bool,
) -> &mut Self
pub fn disable_default_idle_callback( &mut self, disable_default_idle_callback: bool, ) -> &mut Self
If set to true
, disables the default idle timeout callback.
Sourcepub fn idle_manager_options(
&mut self,
idle_manager_options: IdleManagerOptions,
) -> &mut Self
pub fn idle_manager_options( &mut self, idle_manager_options: IdleManagerOptions, ) -> &mut Self
Options for the IdleManager
that handles idle timeouts.
Sourcepub fn on_idle(&mut self, on_idle: fn()) -> &mut Self
pub fn on_idle(&mut self, on_idle: fn()) -> &mut Self
A callback function to be executed when the system becomes idle.
Sourcepub fn idle_timeout(&mut self, idle_timeout: u32) -> &mut Self
pub fn idle_timeout(&mut self, idle_timeout: u32) -> &mut Self
The duration of inactivity after which the system is considered idle.
Sourcepub fn scroll_debounce(&mut self, scroll_debounce: u32) -> &mut Self
pub fn scroll_debounce(&mut self, scroll_debounce: u32) -> &mut Self
A delay for debouncing scroll events.
Sourcepub fn capture_scroll(&mut self, capture_scroll: bool) -> &mut Self
pub fn capture_scroll(&mut self, capture_scroll: bool) -> &mut Self
A flag indicating whether to capture scroll events.
Sourcepub fn build(&mut self) -> IdleOptions
pub fn build(&mut self) -> IdleOptions
Build the IdleOptions
.
Auto Trait Implementations§
impl Freeze for IdleOptionsBuilder
impl !RefUnwindSafe for IdleOptionsBuilder
impl !Send for IdleOptionsBuilder
impl !Sync for IdleOptionsBuilder
impl Unpin for IdleOptionsBuilder
impl !UnwindSafe for IdleOptionsBuilder
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