pub fn new<S>(repo_name: S) -> Result<Updater<T>, Error>
    where
        S: Into<String>,
    {
        let releaser = Releaser::new(repo_name);
        Self::load_or_new(releaser)
    }
/// Create an `Updater` object that will interface with a remote repository for updating operations.
///
/// `repo_name` is an arbitrary tag/identifier associated with the remote repository.
///
/// How the `Updater` interacts with the remote server should be implemented using the [`Releaser`]
/// trait. This crate provides a default implementation for interacting with
/// `github.com` repositories, see [`gh()`] and [`GithubReleaser`].
///
/// # Example
///
/// ```rust,no_run
/// # extern crate alfred_rs;
/// # extern crate semver;
/// # extern crate failure;
/// # extern crate url;
///
/// use url::Url;
/// use semver::Version;
///
/// use alfred_rs::Updater;
/// use alfred_rs::updater::Releaser;
/// # use std::env;
/// # use failure::Error;
/// # fn main() {
///
/// #[derive(Clone)]
/// struct MyPrivateHost {/* inner */};
///
/// // You need to actually implement the trait, following is just a mock.
/// impl Releaser for MyPrivateHost {
///     type SemVersion = Version;
///     type DownloadLink = Url;
///
///     fn new<S: Into<String>>(project_id: S) -> Self {
///         MyPrivateHost {}
///     }
///
///     fn fetch_latest_release(&self) -> Result<(Version, Url), Error> {
///         let version = Version::from((1, 0, 12));
///         let url = Url::parse("https://ci.remote.cc/release/latest")?;
///         Ok((version, url))
///     }
/// }
///
/// let updater: Updater<MyPrivateHost> =
///     Updater::new("my_hidden_proj").expect("cannot initiate Updater");
/// # }
/// ```
///
/// This only creates an `Updater` without performing any network operations.
/// To check availability of a new release, launch and check for updates by
/// using [`init()`] and [`update_ready()`] or [`try_update_ready()`] methods.
///
/// To check availability of a new release use [`update_ready()`] method.
///
/// To download an available release use [`download_latest()`] method afterwards.
///
/// # Errors
/// Error will happen during calling this method if:
/// - `Updater` state cannot be read/written during instantiation, or
/// - The workflow version cannot be parsed as a semantic version compatible identifier.
///
/// [`init()`]: struct.Updater.html#method.init
/// [`update_ready()`]: struct.Updater.html#method.update_ready
/// [`try_update_ready()`]: struct.Updater.html#method.try_update_ready
/// [`download_latest()`]: struct.Updater.html#method.download_latest
/// [`Releaser`]: trait.Releaser.html
/// [`GithubReleaser`]: struct.GithubReleaser.html
/// [`gh()`]: struct.Updater.html#method.gh
Create an `Updater` object that will interface with a remote repository for updating operations.
`repo_name` is an arbitrary tag/identifier associated with the remote repository.


Create an ` Updater ` object that will interface with a remote repository for updating operations . ` repo_name ` is an arbitrary tag / identifier associated with the remote repository .
pub fn new<S>(repo_name: S) -> Result<Updater<T>, Error>
    where
        S: Into<String>,
    {
        let releaser = Releaser::new(repo_name);
        Self::load_or_new(releaser)
    }
pub fn new < S > ( repo_name : S ) -> Result < Updater < T > , Error > where S : Into < String > , { let releaser = Releaser :: new ( repo_name ) ; Self :: load_or_new ( releaser ) }
Create an `Updater` object that will interface with a remote repository for updating operations.
Create an ` Updater ` object that will interface with a remote repository for updating operations .
repo_name
S
repo_name
S
example
None
extern crate alfred_rs;
None
extern crate semver;
None
extern crate failure;
None
extern crate url;
use url::Url;
use semver::Version.

use alfred_rs::Updater;
use alfred_rs::updater::Releaser.
use url :: Url ; use semver :: Version . use alfred_rs :: Updater ; use alfred_rs :: updater :: Releaser .
use std::env;
None
use failure::error;
None
fn main() {
None
[derive(clone)]
struct MyPrivateHost { inner */}.

You need to actually implement the trait, following is just a mock.
impl Releaser for MyPrivateHost {
type SemVersion = Version;
type DownloadLink = Url.

fn new>(project_id: S) -> Self {
MyPrivateHost {}
}




struct MyPrivateHost { inner * / } . You need to actually implement the trait following is just a mock . impl Releaser for MyPrivateHost { type SemVersion = Version ; type DownloadLink = Url . fn new > ( project_id : S ) - > Self { MyPrivateHost {} }
}


This only creates an `Updater` without performing any network operations.
To check availability of a new release, launch and check for updates by
using [`init()`] and [`update_ready()`] or [`try_update_ready()`] methods.

To check availability of a new release use [`update_ready()`] method.

To download an available release use [`download_latest()`] method afterwards.
This only creates an ` Updater ` without performing any network operations . To check availability of a new release launch and check for updates by using [ ` init () ` ] and [ ` update_ready () ` ] or [ ` try_update_ready () ` ] methods . To check availability of a new release use [ ` update_ready () ` ] method . To download an available release use [ ` download_latest () ` ] method afterwards .
errors
Error will happen during calling this method if:
`Updater` state cannot be read/written during instantiation, or
The workflow version cannot be parsed as a semantic version compatible identifier.

[`init()`]: struct.Updater.html#method.init
[`update_ready()`]: struct.Updater.html#method.update_ready
[`try_update_ready()`]: struct.Updater.html#method.try_update_ready
[`download_latest()`]: struct.Updater.html#method.download_latest
[`Releaser`]: trait.Releaser.html
[`GithubReleaser`]: struct.GithubReleaser.html
[`gh()`]: struct.Updater.html#method.gh
Error will happen during calling this method if : ` Updater ` state cannot be read / written during instantiation or The workflow version cannot be parsed as a semantic version compatible identifier . [ ` init () ` ] : struct . Updater . html#method . init [ ` update_ready () ` ] : struct . Updater . html#method . update_ready [ ` try_update_ready () ` ] : struct . Updater . html#method . try_update_ready [ ` download_latest () ` ] : struct . Updater . html#method . download_latest [ ` Releaser ` ] : trait . Releaser . html [ ` GithubReleaser ` ] : struct . GithubReleaser . html [ ` gh () ` ] : struct . Updater . html#method . gh