pub struct Builder { /* private fields */ }Expand description
Builder for Options.
Implementations§
Source§impl Builder
impl Builder
Sourcepub fn idle(&mut self, value: bool) -> &mut Self
pub fn idle(&mut self, value: bool) -> &mut Self
Prevent the system from sleeping due to idleness.
Sourcepub fn sleep(&mut self, value: bool) -> &mut Self
pub fn sleep(&mut self, value: bool) -> &mut Self
Prevent the system from sleeping. Only works under certain, OS dependant, conditions.
Sourcepub fn reason<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn reason<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Reason the consumer is keeping the system awake. Defaults to "User requested". (Used on Linux & macOS)
Sourcepub fn app_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn app_name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Name of the program keeping the system awake. Defaults to "keep-active". (Used on Linux)
Sourcepub fn app_reverse_domain<VALUE: Into<String>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn app_reverse_domain<VALUE: Into<String>>( &mut self, value: VALUE, ) -> &mut Self
Reverse domain name of the program keeping the system awake. Defaults to "io.github.omerbustun.keep-active". (Used on Linux)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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