pub trait Releaser: Clone {
    type SemVersion: Into<Version>;
    type DownloadLink: Into<Url>;

    fn new<S: Into<String>>(name: S) -> Self;
    fn fetch_latest_release(
        &self
    ) -> Result<(Self::SemVersion, Self::DownloadLink)>; fn latest_release(&self) -> Result<(Version, Url)> { ... } }
Expand description

An interface for checking with remote servers to identify the latest release for an Alfred workflow.

This trait has been implemented for GithubReleaser to check for a newer version of a workflow that’s maintained on github.com

Required Associated Types

Typte that represents semantic compatible identifier of a release.

Type that represents a url to the latest release resource.

Required Methods

Creates a new Releaser instance that is identified as name

Performs necessary communications to obtain release info in form of SemVersion and DownloadLink types.

Returned tuple consists of semantic version compatible identifier of the release and a download link/url that can be used to fetch the release.

Implementors are strongly encouraged to get the meta-data about the latest release without performing a full download of the workflow.

Errors

Method returns Err(Error) on file or network error.

Provided Methods

Returns the latest release information that is available from server.

Errors

Method returns Err(Error) on file or network error.

Implementors