pub struct IdleOptionsBuilder { /* private fields */ }Expand description
Builder for IdleOptions.
Implementations§
Source§impl IdleOptionsBuilder
impl IdleOptionsBuilder
Sourcepub fn disable_idle(self, disable_idle: bool) -> Self
pub fn disable_idle(self, disable_idle: bool) -> Self
If set to true, disables the idle timeout functionality.
Sourcepub fn disable_default_idle_callback(
self,
disable_default_idle_callback: bool,
) -> Self
pub fn disable_default_idle_callback( self, disable_default_idle_callback: bool, ) -> Self
If set to true, disables the default idle timeout callback.
Sourcepub fn idle_manager_options(
self,
idle_manager_options: IdleManagerOptions,
) -> Self
pub fn idle_manager_options( self, idle_manager_options: IdleManagerOptions, ) -> Self
Options for the IdleManager that handles idle timeouts.
Sourcepub fn on_idle(self, on_idle: fn()) -> Self
pub fn on_idle(self, on_idle: fn()) -> Self
A callback function to be executed when the system becomes idle.
Note: This replaces any existing callbacks. Use add_on_idle for multiple.
Sourcepub fn add_on_idle<F>(self, on_idle: F) -> Self
pub fn add_on_idle<F>(self, on_idle: F) -> Self
Adds a callback function to be executed when the system becomes idle.
Sourcepub fn idle_timeout(self, idle_timeout: u32) -> Self
pub fn idle_timeout(self, idle_timeout: u32) -> Self
The duration of inactivity after which the system is considered idle.
Sourcepub fn scroll_debounce(self, scroll_debounce: u32) -> Self
pub fn scroll_debounce(self, scroll_debounce: u32) -> Self
A delay for debouncing scroll events.
Sourcepub fn capture_scroll(self, capture_scroll: bool) -> Self
pub fn capture_scroll(self, capture_scroll: bool) -> Self
A flag indicating whether to capture scroll events.
Sourcepub fn build(self) -> IdleOptions
pub fn build(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