pub struct CheckVersion { /* private fields */ }
Expand description
holds the vendor type and the base version context
Implementations§
Source§impl CheckVersion
impl CheckVersion
Sourcepub fn new(
app_name: &str,
vendor: Box<dyn Vendor + Send>,
timeout: u64,
) -> AnyResult<Self>
pub fn new( app_name: &str, vendor: Box<dyn Vendor + Send>, timeout: u64, ) -> AnyResult<Self>
Create a new check version instance
§Errors
Will return Err
if runtime multi thread could not be build
Sourcepub fn run(&self, version: &str) -> AnyResult<()>
pub fn run(&self, version: &str) -> AnyResult<()>
Run version check in the background
§Errors
Will return Err
if runtime multi thread could not be build
pub fn printstd(&self)
Sourcepub fn printstd_with_template(&self, template: &str)
pub fn printstd_with_template(&self, template: &str)
create custom template
§Supported fields:
{{ app_name }}
: Application name{{ new_version }}
: Newest version number{{ current_version }}
: Current version{{ download_link }}
: Link to the new release file
Auto Trait Implementations§
impl !Freeze for CheckVersion
impl RefUnwindSafe for CheckVersion
impl Send for CheckVersion
impl Sync for CheckVersion
impl Unpin for CheckVersion
impl UnwindSafe for CheckVersion
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