Skip to main content

UpdateConfig

Trait UpdateConfig 

Source
pub trait UpdateConfig: Sealed {
Show 19 methods // Required methods fn current_version(&self) -> &str; fn target(&self) -> &str; fn release_tag(&self) -> Option<&str>; fn bin_name(&self) -> &str; fn bin_install_path(&self) -> &Path; fn bin_path_in_archive(&self) -> &str; fn show_download_progress(&self) -> bool; fn show_output(&self) -> bool; fn no_confirm(&self) -> bool; fn progress_template(&self) -> &str; fn progress_chars(&self) -> &str; fn auth_token(&self) -> Option<&str>; // Provided methods fn asset_identifier(&self) -> Option<&str> { ... } fn check_install_path_writable(&self) -> bool { ... } fn bundle_path_in_archive(&self) -> Option<&str> { ... } fn bundle_install_path(&self) -> Option<&Path> { ... } fn update_strategy(&self) -> UpdateStrategy { ... } fn show_release_notes(&self) -> bool { ... } fn api_headers(&self, _auth_token: Option<&str>) -> Result<HeaderMap> { ... }
}

Required Methods§

Source

fn current_version(&self) -> &str

Current version of binary being updated

Source

fn target(&self) -> &str

Target platform the update is being performed for

Source

fn release_tag(&self) -> Option<&str>

Release tag optionally specified for the update (set via release_tag)

Source

fn bin_name(&self) -> &str

Name of the binary being updated

Source

fn bin_install_path(&self) -> &Path

Installation path for the binary being updated

Source

fn bin_path_in_archive(&self) -> &str

Path of the binary to be extracted from release package

Source

fn show_download_progress(&self) -> bool

Flag indicating if progress information shall be output when downloading a release

Source

fn show_output(&self) -> bool

Flag indicating if process informative messages shall be output

Source

fn no_confirm(&self) -> bool

Flag indicating if the user shouldn’t be prompted to confirm an update

Source

fn progress_template(&self) -> &str

Available on crate feature progress-bar only.

Message template to use if show_download_progress is set (see indicatif::ProgressStyle)

Source

fn progress_chars(&self) -> &str

Available on crate feature progress-bar only.

Progress characters to use if show_download_progress is set (see indicatif::ProgressStyle)

Source

fn auth_token(&self) -> Option<&str>

Authorisation token for communicating with backend

Provided Methods§

Source

fn asset_identifier(&self) -> Option<&str>

Optional identifier for determining the asset among multiple matches (set via asset_identifier)

Source

fn check_install_path_writable(&self) -> bool

Whether to run the opt-in preflight writability probe of bin_install_path before downloading (set via check_install_path_writable). Defaults to false.

Source

fn bundle_path_in_archive(&self) -> Option<&str>

The bundle directory inside the archive (set via bundle_path_in_archive), relative to the archive root. Some selects bundle mode: the whole directory replaces bundle_install_path instead of a single file replacing bin_install_path. Defaults to None.

Source

fn bundle_install_path(&self) -> Option<&Path>

The installed bundle directory replaced in bundle mode, resolved at build() time. Some exactly when bundle_path_in_archive is. Defaults to None.

Source

fn update_strategy(&self) -> UpdateStrategy

Strategy for choosing which release the unpinned “latest” path installs (set via update_strategy). Defaults to UpdateStrategy::Compatible.

Source

fn show_release_notes(&self) -> bool

Flag indicating whether the release notes URL (or body) should be shown in the confirmation prompt (set via show_release_notes). Defaults to false.

Source

fn api_headers(&self, _auth_token: Option<&str>) -> Result<HeaderMap>

Construct a header with an authorisation entry if an auth token is provided.

The trait default is a no-op (empty header map): the authorization scheme now lives in the per-backend RequestConfig and is applied by the shared header-derivation, not here. Backends that need a custom user-agent / scheme still override this (github/gitlab/gitea).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl UpdateConfig for self_update::backends::custom::Update

Source§

impl UpdateConfig for self_update::backends::gitea::Update

Available on crate feature gitea only.
Source§

impl UpdateConfig for self_update::backends::gitee::Update

Available on crate feature gitee only.
Source§

impl UpdateConfig for self_update::backends::github::Update

Available on crate feature github only.
Source§

impl UpdateConfig for self_update::backends::gitlab::Update

Available on crate feature gitlab only.
Source§

impl UpdateConfig for self_update::backends::manifest::Update

Available on crate feature manifest only.
Source§

impl UpdateConfig for self_update::backends::s3::Update

Available on crate feature s3 only.
Source§

impl<S> UpdateConfig for AsyncUpdate<S>