pub struct Update {Show 19 fields
pub current_version: Version,
pub version: Version,
pub date: Option<OffsetDateTime>,
pub body: Option<String>,
pub raw_json: Value,
pub download_url: Url,
pub signature: String,
pub pubkey: String,
pub target: String,
pub installer_kind: InstallerKind,
pub headers: HeaderMap,
pub timeout: Option<Duration>,
pub proxy: Option<Url>,
pub no_proxy: bool,
pub dangerous_accept_invalid_certs: bool,
pub dangerous_accept_invalid_hostnames: bool,
pub extract_path: PathBuf,
pub app_name: String,
pub installer_args: Vec<OsString>,
}Expand description
Ready-to-download update candidate produced by crate::Updater::check.
This is the fully resolved, target-specific update payload after source selection, manifest decoding, and installer-kind detection.
Fields§
§current_version: VersionCurrent application version.
version: VersionTarget release version.
date: Option<OffsetDateTime>Optional release publication date.
body: Option<String>Optional release body or notes.
raw_json: ValueRaw serialized release payload for advanced consumers.
download_url: UrlConcrete artifact download URL.
signature: StringDetached minisign signature for the selected artifact.
pubkey: StringMinisign public key used for verification.
target: StringSelected target string.
installer_kind: InstallerKindInstaller format chosen for the selected artifact.
headers: HeaderMapHTTP headers propagated from the updater builder.
timeout: Option<Duration>Optional download timeout.
proxy: Option<Url>Optional proxy configuration.
no_proxy: boolWhether proxy configuration should be ignored.
dangerous_accept_invalid_certs: boolWhether invalid TLS certificates should be accepted.
dangerous_accept_invalid_hostnames: boolWhether invalid TLS hostnames should be accepted.
extract_path: PathBufFinal installation target path.
app_name: StringApplication name used by platform backends.
installer_args: Vec<OsString>Windows installer arguments propagated from configuration and builder overrides.
Implementations§
Source§impl Update
impl Update
Sourcepub async fn download<C>(&self, on_chunk: C) -> Result<Vec<u8>>
pub async fn download<C>(&self, on_chunk: C) -> Result<Vec<u8>>
Downloads the selected artifact and verifies its detached minisign signature.
The chunk callback receives the total number of bytes currently fetched for this download operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Update
impl RefUnwindSafe for Update
impl Send for Update
impl Sync for Update
impl Unpin for Update
impl UnsafeUnpin for Update
impl UnwindSafe for Update
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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