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§
Sourcefn current_version(&self) -> &str
fn current_version(&self) -> &str
Current version of binary being updated
Sourcefn release_tag(&self) -> Option<&str>
fn release_tag(&self) -> Option<&str>
Release tag optionally specified for the update (set via release_tag)
Sourcefn bin_install_path(&self) -> &Path
fn bin_install_path(&self) -> &Path
Installation path for the binary being updated
Sourcefn bin_path_in_archive(&self) -> &str
fn bin_path_in_archive(&self) -> &str
Path of the binary to be extracted from release package
Sourcefn show_download_progress(&self) -> bool
fn show_download_progress(&self) -> bool
Flag indicating if progress information shall be output when downloading a release
Sourcefn show_output(&self) -> bool
fn show_output(&self) -> bool
Flag indicating if process informative messages shall be output
Sourcefn no_confirm(&self) -> bool
fn no_confirm(&self) -> bool
Flag indicating if the user shouldn’t be prompted to confirm an update
Sourcefn progress_template(&self) -> &str
Available on crate feature progress-bar only.
fn progress_template(&self) -> &str
progress-bar only.Message template to use if show_download_progress is set (see indicatif::ProgressStyle)
Sourcefn progress_chars(&self) -> &str
Available on crate feature progress-bar only.
fn progress_chars(&self) -> &str
progress-bar only.Progress characters to use if show_download_progress is set (see indicatif::ProgressStyle)
Sourcefn auth_token(&self) -> Option<&str>
fn auth_token(&self) -> Option<&str>
Authorisation token for communicating with backend
Provided Methods§
Sourcefn asset_identifier(&self) -> Option<&str>
fn asset_identifier(&self) -> Option<&str>
Optional identifier for determining the asset among multiple matches (set via
asset_identifier)
Sourcefn check_install_path_writable(&self) -> bool
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.
Sourcefn bundle_path_in_archive(&self) -> Option<&str>
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.
Sourcefn bundle_install_path(&self) -> Option<&Path>
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.
Sourcefn update_strategy(&self) -> UpdateStrategy
fn update_strategy(&self) -> UpdateStrategy
Strategy for choosing which release the unpinned “latest” path installs (set via
update_strategy). Defaults to UpdateStrategy::Compatible.
Sourcefn show_release_notes(&self) -> bool
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.
Sourcefn api_headers(&self, _auth_token: Option<&str>) -> Result<HeaderMap>
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§
impl UpdateConfig for self_update::backends::custom::Update
impl UpdateConfig for self_update::backends::gitea::Update
gitea only.impl UpdateConfig for self_update::backends::gitee::Update
gitee only.impl UpdateConfig for self_update::backends::github::Update
github only.impl UpdateConfig for self_update::backends::gitlab::Update
gitlab only.impl UpdateConfig for self_update::backends::manifest::Update
manifest only.impl UpdateConfig for self_update::backends::s3::Update
s3 only.