Struct InstallerBuilder

Source
pub struct InstallerBuilder<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> InstallerBuilder<'a>

Source

pub fn new(install: &'a mut dyn Installer) -> InstallerBuilder<'_>

Source

pub fn set_name(self, name: &'static str) -> Self

Sets the global installer name

§Arguments
  • version - The version of this installer as a static string
Source

pub fn set_version(self, version: &'static str) -> Self

Sets the global installer version

§Arguments
  • version - The version of this installer as a static string
Source

pub fn set_author(self, author: &'static str) -> Self

Sets the global installer author

§Arguments
  • author - The author of this installer as a static string
Source

pub fn add_resource(self, path: &'static str, bytes: &'static [u8]) -> Self

Add a resource

§Arguments
  • path - path to use for referencing in the install script
  • bytes - resource binary data (use include_bytes!)
Source

pub fn add_post_install_step(self, obj: &'a mut dyn PostInstall) -> Self

Add a PostInstall step to this installer

§Arguments
  • obj - reference to the PostInstall trait
Source

pub fn add_post_uninstall_step(self, obj: &'a mut dyn PostUninstall) -> Self

Add a PostUninstall step to this installer

§Arguments
  • obj - reference to the PostUninstall trait
Source

pub fn allow_user_install(self) -> Self

Allows user installs

Source

pub fn allow_system_install(self) -> Self

Allows system wide installs

Source

pub fn run<TInterface: Interface>(&mut self, interface: &mut TInterface) -> i32

Auto Trait Implementations§

§

impl<'a> Freeze for InstallerBuilder<'a>

§

impl<'a> !RefUnwindSafe for InstallerBuilder<'a>

§

impl<'a> Send for InstallerBuilder<'a>

§

impl<'a> !Sync for InstallerBuilder<'a>

§

impl<'a> Unpin for InstallerBuilder<'a>

§

impl<'a> !UnwindSafe for InstallerBuilder<'a>

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, 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.