StCli

Enum StCli 

Source
pub enum StCli {
Show 14 variants Build, Clean, Format, Lint, Outdated, Run, Update, Test, Sync, Lock, Install, Publish, Bump(Bump), Django(DjangoSubCmd),
}

Variants§

§

Build

编译

Rust 项目 默认使用: cargo build npm 项目 不支持 poetry 项目 默认使用: poetry build 打包

§

Clean

清理开发环境

Rust 使用 cargo clean

npm 清理缓存 npm cache clean

poetry 不支持

§

Format

格式化代码

当前支持

Python poetry 的项目 [需要安装 black]

Rust 项目 cargo fmt

§

Lint

代码检测

Rust 使用 Cargo clippy

Python 使用 pylama

§

Outdated

检测依赖是否有新版

Rust 使用 Cargo

Python 使用 Poetry

§

Run

运行

Rust 使用 cargo run

Python Django 项目使用 django-admin runserver

§

Update

升级依赖版本

Rust 使用 cargo

Python 使用 Poetry

§

Test

测试

Rust 语言使用 cargo test

Python 使用 pytest

§

Sync

同步依赖

§

Lock

锁定依赖

锁定当前的依赖

Python 使用 Poetry

§

Install

本地安装

本地安装当前的软件 Rust 使用 cargo install –path .

§

Publish

发布

Python 使用 Poetry 发布到 Pypi

todo Rust 使用 cargo 发布到 Crates

§

Bump(Bump)

提升版本

§

Django(DjangoSubCmd)

django 子命令

Implementations§

Source§

impl StCli

Source

pub fn run(&self)

Trait Implementations§

Source§

impl Debug for StCli

Source§

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

Formats the value using the given formatter. Read more
Source§

impl StructOpt for StCli

Source§

fn clap<'a, 'b>() -> App<'a, 'b>

Returns clap::App corresponding to the struct.
Source§

fn from_clap(matches: &ArgMatches<'_>) -> Self

Builds the struct from clap::ArgMatches. It’s guaranteed to succeed if matches originates from an App generated by StructOpt::clap called on the same type, otherwise it must panic.
Source§

fn from_args() -> Self
where Self: Sized,

Builds the struct from the command line arguments (std::env::args_os). Calls clap::Error::exit on failure, printing the error message and aborting the program.
Source§

fn from_args_safe() -> Result<Self, Error>
where Self: Sized,

Builds the struct from the command line arguments (std::env::args_os). Unlike StructOpt::from_args, returns clap::Error on failure instead of aborting the program, so calling .exit is up to you.
Source§

fn from_iter<I>(iter: I) -> Self
where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,

Gets the struct from any iterator such as a Vec of your making. Print the error message and quit the program in case of failure. Read more
Source§

fn from_iter_safe<I>(iter: I) -> Result<Self, Error>
where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,

Gets the struct from any iterator such as a Vec of your making. Read more

Auto Trait Implementations§

§

impl Freeze for StCli

§

impl RefUnwindSafe for StCli

§

impl Send for StCli

§

impl Sync for StCli

§

impl Unpin for StCli

§

impl UnwindSafe for StCli

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.