Struct tauri::updater::UpdateResponse
source · pub struct UpdateResponse<R: Runtime> { /* private fields */ }
Available on crate feature
updater
only.Expand description
The response of an updater check.
Implementations§
source§impl<R: Runtime> UpdateResponse<R>
impl<R: Runtime> UpdateResponse<R>
sourcepub fn is_update_available(&self) -> bool
pub fn is_update_available(&self) -> bool
Whether the updater found a newer release or not.
sourcepub fn current_version(&self) -> &Version
pub fn current_version(&self) -> &Version
The current version of the application as read by the updater.
sourcepub fn latest_version(&self) -> &str
pub fn latest_version(&self) -> &str
The latest version of the application found by the updater.
sourcepub fn date(&self) -> Option<&OffsetDateTime>
pub fn date(&self) -> Option<&OffsetDateTime>
The update date.
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 header to the download request.
sourcepub fn remove_header<K>(self, key: K) -> Result<Self>
pub fn remove_header<K>(self, key: K) -> Result<Self>
Removes a header from the download request.
sourcepub async fn download_and_install(self) -> Result<()>
pub async fn download_and_install(self) -> Result<()>
Downloads and installs the update.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for UpdateResponse<R>where
<R as Runtime<EventLoopMessage>>::Handle: Freeze,
<R as Runtime<EventLoopMessage>>::GlobalShortcutManager: Freeze,
impl<R> !RefUnwindSafe for UpdateResponse<R>
impl<R> Send for UpdateResponse<R>
impl<R> Sync for UpdateResponse<R>
impl<R> Unpin for UpdateResponse<R>where
<R as Runtime<EventLoopMessage>>::Handle: Unpin,
<R as Runtime<EventLoopMessage>>::GlobalShortcutManager: Unpin,
impl<R> !UnwindSafe for UpdateResponse<R>
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