pub struct UpdaterBuilder { /* private fields */ }Expand description
Configures and creates an Updater.
Implementations§
Source§impl UpdaterBuilder
impl UpdaterBuilder
Sourcepub fn new(
app_name: &str,
current_version: &str,
github_owner: &str,
github_repo: &str,
) -> Self
pub fn new( app_name: &str, current_version: &str, github_owner: &str, github_repo: &str, ) -> Self
Create a new builder.
app_name: Display name used in temp file prefixes and logs.current_version: Your app’s current semantic version.github_owner/github_repo: Repository to query releases from.
Sourcepub fn executable_path<P: AsRef<Path>>(self, p: P) -> Self
pub fn executable_path<P: AsRef<Path>>(self, p: P) -> Self
Override the executable path used to derive install/extract target.
Sourcepub fn header<K, V>(self, key: K, value: V) -> Result<Self>where
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
HeaderValue: TryFrom<V>,
<HeaderValue as TryFrom<V>>::Error: Into<Error>,
pub fn header<K, V>(self, key: K, value: V) -> Result<Self>where
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
HeaderValue: TryFrom<V>,
<HeaderValue as TryFrom<V>>::Error: Into<Error>,
Add a single HTTP header applied to the download request.
Sourcepub fn clear_headers(self) -> Self
pub fn clear_headers(self) -> Self
Remove all configured headers.
Sourcepub fn installer_arg<S>(self, arg: S) -> Self
pub fn installer_arg<S>(self, arg: S) -> Self
Append a single argument to the platform installer invocation (if used).
Sourcepub fn installer_args<I, S>(self, args: I) -> Self
pub fn installer_args<I, S>(self, args: I) -> Self
Append multiple installer arguments.
Sourcepub fn clear_installer_args(self) -> Self
pub fn clear_installer_args(self) -> Self
Clear all installer arguments.
Auto Trait Implementations§
impl Freeze for UpdaterBuilder
impl RefUnwindSafe for UpdaterBuilder
impl Send for UpdaterBuilder
impl Sync for UpdaterBuilder
impl Unpin for UpdaterBuilder
impl UnwindSafe for UpdaterBuilder
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more