Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
    Check {
        crate_name: String,
        version: Option<String>,
    },
    CheckMultiple {
        crate_names: Vec<String>,
        summary_only: bool,
        fail_on_missing: bool,
    },
    Info {
        crate_name: String,
        deps: bool,
        stats: bool,
    },
    Versions {
        crate_name: String,
        no_yanked: bool,
        limit: Option<usize>,
    },
    Search {
        query: String,
        limit: usize,
        exact: bool,
    },
    Deps {
        crate_name: String,
        version: Option<String>,
        runtime_only: bool,
    },
    Stats {
        crate_name: String,
        versions: bool,
    },
    Batch {
        json: Option<String>,
        file: Option<PathBuf>,
        parallel: bool,
    },
    Server {
        port: u16,
        host: String,
        cors: bool,
        config: Option<PathBuf>,
    },
    Config {
        output: Option<PathBuf>,
    },
    Examples,
}
Expand description

Available commands

Variants§

§

Check

Check if a crate exists

Fields

§crate_name: String

Name of the crate to check

§version: Option<String>

Specific version to check (optional)

§

CheckMultiple

Check multiple crates at once with merged output

Fields

§crate_names: Vec<String>

Names of the crates to check (space-separated)

§summary_only: bool

Show only summary (don’t list individual results)

§fail_on_missing: bool

Exit with error code if any crate doesn’t exist

§

Info

Get detailed information about a crate

Fields

§crate_name: String

Name of the crate

§deps: bool

Include dependency information

§stats: bool

Include download statistics

§

Versions

List all versions of a crate

Fields

§crate_name: String

Name of the crate

§no_yanked: bool

Show only non-yanked versions

§limit: Option<usize>

Limit number of versions to show

§

Search

Search for crates by name or keywords

Fields

§query: String

Search query

§limit: usize

Maximum number of results

§exact: bool

Show only exact matches

§

Deps

Show dependencies for a crate version

Fields

§crate_name: String

Name of the crate

§version: Option<String>

Version (defaults to latest)

§runtime_only: bool

Show only runtime dependencies

§

Stats

Show download statistics for a crate

Fields

§crate_name: String

Name of the crate

§versions: bool

Show version-specific stats

§

Batch

Process multiple crates at once

Fields

§json: Option<String>

JSON string with batch input

§file: Option<PathBuf>

JSON file with batch input

§parallel: bool

Process requests in parallel

§

Server

Start HTTP API server

Fields

§port: u16

Port to bind to

§host: String

Host to bind to

§cors: bool

Enable CORS

§config: Option<PathBuf>

Configuration file for server

§

Config

Generate sample configuration file

Fields

§output: Option<PathBuf>

Output file (prints to stdout if not specified)

§

Examples

Show examples of JSON batch input formats

Trait Implementations§

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

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

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

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, 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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