update-informer icon indicating copy to clipboard operation
update-informer copied to clipboard

Document usage without crate's cache file

Open Enyium opened this issue 1 year ago • 0 comments

My GUI app uses its own JSON config file to keep track of whether an update check should be performed. According to my understanding of the following code snippet, calling update_informer::new(...).interval(Duration::ZERO) is the way to achieve this:

        // If the interval is zero, don't use the cache file
        let latest_version = if self.interval.is_zero() {
            match R::get_latest_version(client, &pkg)? {
                Some(v) => v,
                None => return Ok(None),
            }
        } else {

But this isn't documented. Could you please document this usage as a way to completely avoid that the crate does anything on the file system, if I understood this correctly?

BTW: The docs text on interval() says: "An interval in seconds." But it's a Duration, which isn't a second value per se.

Enyium avatar Aug 23 '24 20:08 Enyium