pub struct UpdateConfig {
pub github_owner: String,
pub github_repo: String,
pub bin_name: String,
pub current_version: String,
}Expand description
自动更新配置
Fields§
§github_owner: StringGitHub 仓库所有者
github_repo: StringGitHub 仓库名称
bin_name: String二进制文件名
current_version: String当前版本
Implementations§
Source§impl UpdateConfig
impl UpdateConfig
Sourcepub fn new(
github_owner: impl Into<String>,
github_repo: impl Into<String>,
bin_name: impl Into<String>,
current_version: impl Into<String>,
) -> Self
pub fn new( github_owner: impl Into<String>, github_repo: impl Into<String>, bin_name: impl Into<String>, current_version: impl Into<String>, ) -> Self
创建新的配置
Sourcepub fn with_github_repo(
self,
owner: impl Into<String>,
repo: impl Into<String>,
) -> Self
pub fn with_github_repo( self, owner: impl Into<String>, repo: impl Into<String>, ) -> Self
设置 GitHub 仓库信息
Sourcepub fn with_bin_name(self, name: impl Into<String>) -> Self
pub fn with_bin_name(self, name: impl Into<String>) -> Self
设置二进制文件名
Sourcepub fn with_current_version(self, version: impl Into<String>) -> Self
pub fn with_current_version(self, version: impl Into<String>) -> Self
设置当前版本
Sourcepub fn github_releases_url(&self) -> String
pub fn github_releases_url(&self) -> String
获取 GitHub 下载链接
Sourcepub fn gitee_releases_url(&self) -> String
pub fn gitee_releases_url(&self) -> String
获取 Gitee 下载链接
Sourcepub fn download_links(&self) -> (String, String)
pub fn download_links(&self) -> (String, String)
获取下载链接元组 (GitHub, Gitee)
Trait Implementations§
Source§impl Clone for UpdateConfig
impl Clone for UpdateConfig
Source§fn clone(&self) -> UpdateConfig
fn clone(&self) -> UpdateConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UpdateConfig
impl Debug for UpdateConfig
Auto Trait Implementations§
impl Freeze for UpdateConfig
impl RefUnwindSafe for UpdateConfig
impl Send for UpdateConfig
impl Sync for UpdateConfig
impl Unpin for UpdateConfig
impl UnsafeUnpin for UpdateConfig
impl UnwindSafe for UpdateConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more