pub struct Notifier { /* private fields */ }Expand description
Use Notifier::new(source, pkg_version, pkg_name, pkg_repo_url).run()
to check for updates and notify user if there is a new version available.
§Examples
use tiny_update_notifier::{Notifier, Source};
std::thread::spawn(|| {
Notifier::new(
Source::GitHub,
env!("CARGO_PKG_VERSION"),
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_REPOSITORY"),
)
.interval(Duration::from_secs(60 * 60 * 24 * 7)) // Change interval to 7 days (Default is 24H)
.run();
});Implementations§
Source§impl Notifier
impl Notifier
Sourcepub const fn new(
source: Source,
version: &'static str,
name: &'static str,
repo_url: &'static str,
) -> Self
pub const fn new( source: Source, version: &'static str, name: &'static str, repo_url: &'static str, ) -> Self
Use Notifier::new(source, pkg_version, pkg_name, pkg_repo_url).run()
to check for updates and notify user if there is a new version available.
§Examples
use tiny_update_notifier::{Notifier, Source};
std::thread::spawn(|| {
Notifier::new(
Source::GitHub,
env!("CARGO_PKG_VERSION"),
env!("CARGO_PKG_NAME"),
env!("CARGO_PKG_REPOSITORY"),
)
.interval(Duration::from_secs(60 * 60 * 24 * 7)) // Change interval to 7 days (Default is 24H)
.run();
});Auto Trait Implementations§
impl Freeze for Notifier
impl RefUnwindSafe for Notifier
impl Send for Notifier
impl Sync for Notifier
impl Unpin for Notifier
impl UnwindSafe for Notifier
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