Struct tauri_plugin_updater::Update
source · pub struct Update {
pub body: Option<String>,
pub current_version: String,
pub version: String,
pub date: Option<OffsetDateTime>,
pub target: String,
pub download_url: Url,
pub signature: String,
pub timeout: Option<Duration>,
pub proxy: Option<Url>,
pub headers: HeaderMap,
/* private fields */
}
Fields§
§body: Option<String>
Update description
current_version: String
Version used to check for update
version: String
Version announced
date: Option<OffsetDateTime>
Update publish date
target: String
Target
download_url: Url
Download URL announced
signature: String
Signature announced
timeout: Option<Duration>
Request timeout
proxy: Option<Url>
Request proxy
headers: HeaderMap
Request headers
Implementations§
source§impl Update
impl Update
sourcepub async fn download<C: FnMut(usize, Option<u64>), D: FnOnce()>(
&self,
on_chunk: C,
on_download_finish: D,
) -> Result<Vec<u8>>
pub async fn download<C: FnMut(usize, Option<u64>), D: FnOnce()>( &self, on_chunk: C, on_download_finish: D, ) -> Result<Vec<u8>>
Downloads the updater package, verifies it then return it as bytes.
Use Update::install
to install it
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 !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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)