tauri_updater::updater

Struct UpdateBuilder

Source
pub struct UpdateBuilder { /* private fields */ }

Implementations§

Source§

impl UpdateBuilder

Source

pub fn new() -> Result<UpdateBuilder>

Initialize a new builder, defaulting the bin_install_path to the current executable’s path

  • Errors:
    • Io - Determining current exe path
Source

pub fn release(&mut self, release: Release) -> &mut Self

Source

pub fn current_version(&mut self, ver: &str) -> &mut Self

Set the current app version, used to compare against the latest available version. The cargo_crate_version! macro can be used to pull the version from your Cargo.toml

Source

pub fn bin_name(&mut self, name: &str) -> &mut Self

Set the exe’s name. Also sets bin_path_in_archive if it hasn’t already been set.

Source

pub fn bin_install_path(&mut self, bin_install_path: &str) -> &mut Self

Set the installation path for the new exe, defaults to the current executable’s path

Source

pub fn bin_path_in_archive(&mut self, bin_path: &str) -> &mut Self

Set the path of the exe inside the release tarball. This is the location of the executable relative to the base of the tar’d directory and is the path that will be copied to the bin_install_path. If not specified, this will default to the value of bin_name. This only needs to be specified if the path to the binary (from the root of the tarball) is not equal to just the bin_name.

§Example

For a tarball myapp.tar.gz with the contents:

myapp.tar/
 |------- bin/
 |         |--- myapp  # <-- executable

The path provided should be:

Update::configure()?
    .bin_path_in_archive("bin/myapp")
Source

pub fn show_download_progress(&mut self, show: bool) -> &mut Self

Toggle download progress bar, defaults to off.

Source

pub fn show_output(&mut self, show: bool) -> &mut Self

Toggle update output information, defaults to true.

Source

pub fn build(&self) -> Result<Update>

Confirm config and create a ready-to-use Update

  • Errors:
    • Config - Invalid Update configuration

Trait Implementations§

Source§

impl Debug for UpdateBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T