pub struct UseIdleOptions {
pub timeout: u32,
pub listen_mouse: bool,
pub listen_keyboard: bool,
pub listen_scroll: bool,
pub listen_visibility: bool,
pub initial_idle: bool,
pub events: Vec<Cow<'static, str>>,
}Expand description
Configuration options for the use_idle hook.
Fields§
§timeout: u32The time in milliseconds after which the user is considered idle. Default: 60_000 (1 minute)
listen_mouse: boolWhether to listen for mouse events. Default: true
listen_keyboard: boolWhether to listen for keyboard events. Default: true
listen_scroll: boolWhether to listen for scroll events. Default: true
listen_visibility: boolWhether to listen for visibility change events. Default: true
initial_idle: boolWhether to start in idle state. Default: false
events: Vec<Cow<'static, str>>Additional events to listen for.
Trait Implementations§
Source§impl Clone for UseIdleOptions
impl Clone for UseIdleOptions
Source§fn clone(&self) -> UseIdleOptions
fn clone(&self) -> UseIdleOptions
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 UseIdleOptions
impl Debug for UseIdleOptions
Source§impl Default for UseIdleOptions
impl Default for UseIdleOptions
Source§impl PartialEq for UseIdleOptions
impl PartialEq for UseIdleOptions
impl StructuralPartialEq for UseIdleOptions
Auto Trait Implementations§
impl Freeze for UseIdleOptions
impl RefUnwindSafe for UseIdleOptions
impl Send for UseIdleOptions
impl Sync for UseIdleOptions
impl Unpin for UseIdleOptions
impl UnsafeUnpin for UseIdleOptions
impl UnwindSafe for UseIdleOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.