pub struct Autostart<'a> { /* private fields */ }Expand description
Whether the application starts at login, from Os::autostart.
The entry is written under the identifier App::new
names and starts the program running now: on Linux the AppImage the
person installed, and elsewhere the running binary, so a run from
cargo run writes an entry for the binary under target.
Implementations§
Source§impl Autostart<'_>
impl Autostart<'_>
Sourcepub async fn enable(&self) -> Result<(), Error>
pub async fn enable(&self) -> Result<(), Error>
Has the system start the application each time the person logs in.
§Errors
Fails with ErrorKind::Autostart
when the entry cannot be written.
Sourcepub async fn disable(&self) -> Result<(), Error>
pub async fn disable(&self) -> Result<(), Error>
Stops the system from starting the application at login.
§Errors
Fails with ErrorKind::Autostart
when the entry cannot be removed.
Sourcepub async fn is_enabled(&self) -> Result<bool, Error>
pub async fn is_enabled(&self) -> Result<bool, Error>
Whether the system starts the application at login.
§Errors
Fails with ErrorKind::Autostart
when the entry cannot be read.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Autostart<'a>
impl<'a> RefUnwindSafe for Autostart<'a>
impl<'a> Send for Autostart<'a>
impl<'a> Sync for Autostart<'a>
impl<'a> Unpin for Autostart<'a>
impl<'a> UnsafeUnpin for Autostart<'a>
impl<'a> UnwindSafe for Autostart<'a>
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.