Struct MyPackageManager

Source
pub struct MyPackageManager;

Trait Implementations§

Source§

impl PackageManager for MyPackageManager

Source§

fn name(&self) -> String

Returns the name of this package manager. This is a unique all-lowercase identifier that should not conflict with any others. It’s common to make this the name of the crate, without the darling- prefix. For example, this could return "example".to_owned(), and the crate would be called darling-example. Read more
Source§

fn install(&self, context: &Context, package: &InstallationEntry) -> Result<()>

Installs a package with the given version. If no version is supplied, this should install the latest version. Note that this does not affect the cache file. This simply supplies the system package install command. Read more
Source§

fn uninstall( &self, context: &Context, package: &InstallationEntry, ) -> Result<()>

Uninstalls a package from the system. This does not affect the cache file, it simply removes the package from the system itself, and darling-core will handle removing the package from the cache file. Read more
Source§

fn get_all_explicit(&self, context: &Context) -> Result<Vec<(String, String)>>

Returns all explicitly installed packages on the system; That is, packages which are not dependencies of other packages. This should not read from a darling file; Instead, darling uses this method to update the file when running darling require-all Read more
Source§

fn post_install(&self, _context: &Context) -> Result<(), Error>

This is run after a single or group of packages are installed. The difference between placing code here and in [install] is that when running commands like load-installed, which load all installed packages into the darling config file, this is only run once after all packages are installed, instead of every time an individual package is installed. 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, 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.