/// Try to get release info from background worker and see if a new update is available (non-blocking).
///
/// This method will attempt to receive release information from worker thread
/// (spawned by calling [`init()`]). Upon successful retrieval, this method will compare
/// release information to the current vertion of the workflow.
/// The remote repository should tag each release according to semantic version scheme
/// for this to work.
///
/// If communication with worker thread is not successful or if the worker thread could not
/// fetch release information, this method will return an error.
///
/// You should use this method after calling `init()`, preferably after your workflow is done with other tasks
/// and now wants to get information about the latest release.
///
/// # Note
///
/// - To wait for the worker thread to deliver its release information you can use the blocking
/// [`update_ready()`] method.
/// - The *very first* call to this method will always return false since it is assumed that
/// user has just downloaded and installed the workflow.
///
/// # Example
///
/// ```no_run
/// extern crate alfred_rs;
/// # extern crate failure;
///
/// use alfred_rs::Updater;
///
/// # use failure::Error;
/// # use std::io;
///
/// # fn do_some_other_stuff() {}
///
/// fn main() {
/// let updater =
///     Updater::gh("spamwax/alfred-pinboard-rs").expect("cannot initiate Updater");
/// updater.init().expect("cannot start the worker thread");
///
/// // Perform other workflow related tasks...
/// do_some_other_stuff();
///
/// assert_eq!(true, updater.try_update_ready().expect("cannot get update information"));
///
/// // Execution of program will immediately follow to here since this method is non-blocking.
///
/// }
/// ```
///
/// # Errors
/// Error will be returned :
/// - If worker thread is not ready to send information or it has been interrupted
/// - If [`init()`] method has not been called successfully before this method
/// - If worker could not communicate with server
/// - If any file error or Alfred environment variable error happens
///
/// [`init()`]: struct.Updater.html#method.init
/// [`update_ready()`]: struct.Updater.html#method.update_ready
Try to get release info from background worker and see if a new update is available (non-blocking).
This method will attempt to receive release information from worker thread
(spawned by calling [`init()`]). Upon successful retrieval, this method will compare
release information to the current vertion of the workflow.
The remote repository should tag each release according to semantic version scheme
for this to work.

If communication with worker thread is not successful or if the worker thread could not
fetch release information, this method will return an error.

You should use this method after calling `init()`, preferably after your workflow is done with other tasks
and now wants to get information about the latest release.
Try to get release info from background worker and see if a new update is available ( non - blocking ) . This method will attempt to receive release information from worker thread ( spawned by calling [ ` init () ` ] ) . Upon successful retrieval this method will compare release information to the current vertion of the workflow . The remote repository should tag each release according to semantic version scheme for this to work . If communication with worker thread is not successful or if the worker thread could not fetch release information this method will return an error . You should use this method after calling ` init () ` preferably after your workflow is done with other tasks and now wants to get information about the latest release .
pub fn try_update_ready(&self) -> Result<bool, Error> {
        if self.state.borrow_worker().is_none() {
            bail!("update_ready_sync is deprecated. use init()");
        } else {
            self.update_ready_async(true)
        }
    }
pub fn try_update_ready ( & self ) -> Result < bool , Error > { if self . state . borrow_worker ( ) . is_none ( ) { bail ! ( " " ) ; } else { self . update_ready_async ( true ) } }
Try to get release info from background worker and see if a new update is available (non-blocking).
Try to get release info from background worker and see if a new update is available ( non - blocking ) .
&self
note
To wait for the worker thread to deliver its release information you can use the blocking
[`update_ready()`] method.
The *very first* call to this method will always return false since it is assumed that
user has just downloaded and installed the workflow.
To wait for the worker thread to deliver its release information you can use the blocking [ ` update_ready () ` ] method . The * very first * call to this method will always return false since it is assumed that user has just downloaded and installed the workflow .
example
```no_run
extern crate alfred_rs.
` ` ` no_run extern crate alfred_rs .
extern crate failure;
None
use failure::error;
None
use std::io;
None
fn do_some_other_stuff() {}
fn main() {
let updater
Updater::gh("spamwax/alfred-pinboard-rs").expect("cannot initiate Updater");
updater.init().expect("cannot start the worker thread").

Perform other workflow related tasks
do_some_other_stuff().

assert_eq!(true, updater.try_update_ready().expect("cannot get update information")).

Execution of program will immediately follow to here since this method is non-blocking.


fn main () { let updater Updater :: gh ( " spamwax / alfred - pinboard - rs " ) . expect ( " cannot initiate Updater " ) ; updater . init () . expect ( " cannot start the worker thread " ) . Perform other workflow related tasks do_some_other_stuff () . assert_eq! ( true updater . try_update_ready () . expect ( " cannot get update information " )) . Execution of program will immediately follow to here since this method is non - blocking .
errors
Error will be returned :
If worker thread is not ready to send information or it has been interrupted
If [`init()`] method has not been called successfully before this method
If worker could not communicate with server
If any file error or Alfred environment variable error happens

[`init()`]: struct.Updater.html#method.init
[`update_ready()`]: struct.Updater.html#method.update_ready
Error will be returned : If worker thread is not ready to send information or it has been interrupted If [ ` init () ` ] method has not been called successfully before this method If worker could not communicate with server If any file error or Alfred environment variable error happens [ ` init () ` ] : struct . Updater . html#method . init [ ` update_ready () ` ] : struct . Updater . html#method . update_ready