CargoCommands

Struct CargoCommands 

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

Structure for handling Cargo commands Contains a runtime for async operations

Implementations§

Source§

impl CargoCommands

Source

pub fn new() -> LuaResult<Self>

Create a new CargoCommands instance

Source

pub fn execute<F, T>(&self, future: F) -> T
where F: Future<Output = T>,

Executes a future on the runtime

Source

pub async fn cargo_check(&self, args: &[&str]) -> LuaResult<(String, bool)>

Check the project for errors

Source

pub async fn cargo_bench(&self, args: &[&str]) -> LuaResult<(String, bool)>

Run benchmarks

Source

pub async fn cargo_build(&self, args: &[&str]) -> LuaResult<(String, bool)>

Build the project

Source

pub async fn cargo_run(&self, args: &[&str]) -> LuaResult<(String, bool)>

Run the project

Source

pub async fn cargo_test(&self, args: &[&str]) -> LuaResult<(String, bool)>

Run the tests

Source

pub async fn cargo_clean(&self, args: &[&str]) -> LuaResult<(String, bool)>

Clean the target directory

Source

pub async fn cargo_doc(&self, args: &[&str]) -> LuaResult<(String, bool)>

Generate documentation

Source

pub async fn cargo_new( &self, name: &str, args: &[&str], ) -> LuaResult<(String, bool)>

Create a new package

Source

pub async fn cargo_update(&self, args: &[&str]) -> LuaResult<(String, bool)>

Update dependencies

Source

pub async fn cargo_init(&self, args: &[&str]) -> LuaResult<(String, bool)>

Initialize a new package in an existing directory

Source

pub async fn cargo_add(&self, args: &[&str]) -> LuaResult<(String, bool)>

Add dependencies to a manifest file

Source

pub async fn cargo_remove(&self, args: &[&str]) -> LuaResult<(String, bool)>

Remove dependencies from a manifest file

Source

pub async fn cargo_fmt(&self, args: &[&str]) -> LuaResult<(String, bool)>

Format Rust code

Source

pub async fn cargo_clippy(&self, args: &[&str]) -> LuaResult<(String, bool)>

Run the Clippy linter

Source

pub async fn cargo_fix(&self, args: &[&str]) -> LuaResult<(String, bool)>

Automatically fix lint warnings

Source

pub async fn cargo_publish(&self, args: &[&str]) -> LuaResult<(String, bool)>

Package and upload crate to registry

Source

pub async fn cargo_install(&self, args: &[&str]) -> LuaResult<(String, bool)>

Install a Rust binary

Source

pub async fn cargo_uninstall(&self, args: &[&str]) -> LuaResult<(String, bool)>

Uninstall a Rust binary

Search packages in registry

Source

pub async fn cargo_tree(&self, args: &[&str]) -> LuaResult<(String, bool)>

Display dependency tree

Source

pub async fn cargo_vendor(&self, args: &[&str]) -> LuaResult<(String, bool)>

Vendor all dependencies locally

Source

pub async fn cargo_audit(&self, args: &[&str]) -> LuaResult<(String, bool)>

Audit dependencies for security vulnerabilities

Source

pub async fn cargo_outdated(&self, args: &[&str]) -> LuaResult<(String, bool)>

Show outdated dependencies

Source

pub async fn cargo_help(&self, args: &[&str]) -> LuaResult<(String, bool)>

Get Cargo help

Source

pub async fn cargo_autodd(&self, _args: &[&str]) -> LuaResult<(String, bool)>

Run cargo-autodd command

Trait Implementations§

Source§

impl Clone for CargoCommands

Source§

fn clone(&self) -> CargoCommands

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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<T> MaybeSend for T