Struct Installer

Source
pub struct Installer { /* private fields */ }
Expand description

An installer that can install packages into a prefix.

Implementations§

Source§

impl Installer

Source

pub fn new() -> Self

Constructs a new installer

Source

pub fn with_io_concurrency_limit(self, limit: usize) -> Self

Sets an optional IO concurrency limit. This is used to make sure that the system doesn’t acquire more IO resources than the system has available.

Source

pub fn set_io_concurrency_limit(&mut self, limit: usize) -> &mut Self

Sets an optional IO concurrency limit.

This function is similar to Self::with_io_concurrency_limit, but modifies an existing instance.

Source

pub fn with_io_concurrency_semaphore( self, io_concurrency_semaphore: Arc<Semaphore>, ) -> Self

Sets an optional IO concurrency semaphore. This is used to make sure that the system doesn’t acquire more IO resources than the system has available.

Source

pub fn set_io_concurrency_semaphore(&mut self, limit: usize) -> &mut Self

Sets an optional IO concurrency semaphore.

This function is similar to Self::with_io_concurrency_semaphore, but modifies an existing instance.

Sets whether to execute link scripts or not.

By default, link scripts are not executed. Link scripts can run arbitrary code during the installation phase which makes them a security risk.

Sets whether to execute link scripts or not.

By default, link scripts are not executed. Link scripts can run arbitrary code during the installation phase which makes them a security risk.

Source

pub fn with_package_cache(self, package_cache: PackageCache) -> Self

Sets the package cache to use.

Source

pub fn set_package_cache(&mut self, package_cache: PackageCache) -> &mut Self

Sets the package cache to use.

This function is similar to Self::with_package_cache,but modifies an existing instance.

Source

pub fn with_download_client(self, downloader: impl Into<LazyClient>) -> Self

Sets the download client to use

Source

pub fn set_download_client( &mut self, downloader: impl Into<LazyClient>, ) -> &mut Self

Sets the download client to use

This function is similar to Self::with_download_client, but modifies an existing instance.

Source

pub fn with_reporter<R: Reporter + 'static>(self, reporter: R) -> Self

Sets a reporter that will receive events during the installation process.

Source

pub fn set_reporter<R: Reporter + 'static>(&mut self, reporter: R) -> &mut Self

Sets a reporter that will receive events during the installation process.

This function is similar to Self::with_reporter,but modifies an existing instance.

Source

pub fn with_installed_packages(self, installed: Vec<PrefixRecord>) -> Self

Sets the packages that are currently installed in the prefix. If this is not set, the installation process will first figure this out.

Source

pub fn with_reinstall_packages(self, reinstall: HashSet<PackageName>) -> Self

Set the packages that we want explicitly to be reinstalled.

Source

pub fn set_reinstall_packages( &mut self, reinstall: HashSet<PackageName>, ) -> &mut Self

Set the packages that we want explicitly to be reinstalled. This function is similar to Self::with_reinstall_packages,but modifies an existing instance.

Source

pub fn with_ignored_packages(self, ignored: HashSet<PackageName>) -> Self

Set the packages that should be ignored (left untouched) during installation. Ignored packages will not be removed, installed, or updated.

Source

pub fn set_ignored_packages( &mut self, ignored: HashSet<PackageName>, ) -> &mut Self

Set the packages that should be ignored (left untouched) during installation. Ignored packages will not be removed, installed, or updated. This function is similar to Self::with_ignored_packages, but modifies an existing instance.

Source

pub fn set_installed_packages( &mut self, installed: Vec<PrefixRecord>, ) -> &mut Self

Sets the packages that are currently installed in the prefix. If this is not set, the installation process will first figure this out.

This function is similar to Self::with_installed_packages,but modifies an existing instance.

Source

pub fn with_target_platform(self, target_platform: Platform) -> Self

Sets the target platform of the installation. If not specifically set this will default to the current platform.

Source

pub fn set_target_platform(&mut self, target_platform: Platform) -> &mut Self

Sets the target platform of the installation. If not specifically set this will default to the current platform.

This function is similar to Self::with_target_platform, but modifies an existing instance.

Source

pub fn with_apple_code_signing_behavior( self, behavior: AppleCodeSignBehavior, ) -> Self

Determines how to handle Apple code signing behavior.

Source

pub fn set_apple_code_signing_behavior( &mut self, behavior: AppleCodeSignBehavior, ) -> &mut Self

Determines how to handle Apple code signing behavior.

This function is similar to Self::with_apple_code_signing_behavior,but modifies an existing instance.

Sets the link options for the installer.

Sets the link options for the installer.

Source

pub fn with_requested_specs(self, specs: Vec<MatchSpec>) -> Self

Sets the requested specs for the installer. These will be used to populate the requested_spec field in generated PrefixRecord instances.

Source

pub fn set_requested_specs(&mut self, specs: Vec<MatchSpec>) -> &mut Self

Sets the requested specs for the installer. These will be used to populate the requested_spec field in generated PrefixRecord instances.

Source

pub async fn install( self, prefix: impl AsRef<Path>, records: impl IntoIterator<Item = RepoDataRecord>, ) -> Result<InstallationResult, InstallerError>

Install the packages in the given prefix.

Trait Implementations§

Source§

impl Default for Installer

Source§

fn default() -> Installer

Returns the “default value” for a type. 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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

§

fn null_value() -> T

The none-equivalent value.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more