Enum quartz_cli::cli::Commands

source ·
pub enum Commands {
Show 18 variants Init { directory: Option<PathBuf>, }, Send, Create { handle: String, url: Option<String>, method: Option<String>, query: Vec<String>, header: Vec<String>, switch: bool, }, Use { handle: String, }, Status { command: StatusCommands, }, List { depth: Option<u16>, }, Remove { handle: String, }, Show { handle: Option<String>, }, Edit { editor: Option<String>, }, Url { command: EndpointUrlCommands, }, Method { command: EndpointMethodCommands, }, Query { command: EndpointQueryCommands, }, Header { set: Vec<String>, get: Option<String>, remove: Vec<String>, list: bool, }, Body { stdin: bool, edit: bool, print: bool, }, History { max_count: Option<usize>, date: Option<String>, }, Context { command: ContextCommands, }, Variable { get: Option<String>, set: Vec<String>, list: bool, edit: bool, }, Config { command: ConfigCommands, },
}

Variants§

§

Init

Fields

§directory: Option<PathBuf>

Initialize quartz

§

Send

Send request using the current handle’s endpoint and outputs the response

§

Create

Fields

§handle: String
§url: Option<String>

Set handle’s endpoint URL

§method: Option<String>

Set handle’s endpoint method value

§query: Vec<String>

Set a query entry in “key=value” format.

§header: Vec<String>

Set a header entry in “: ” format. This argument can be passed multiple times

§switch: bool

Immediatly switches to this handle after creating it.

Create a new handle

§

Use

Fields

§handle: String

Switch to a handle

§

Status

Fields

Print the current status of quartz

§

List

Fields

§depth: Option<u16>

Set a limit for how deep the listing goes in sub-handles

Lists available handles

§

Remove

Fields

§handle: String

Endpoint specification

Delete the specified handle recursively

§

Show

Fields

§handle: Option<String>

Print endpoint informations at a handle

§

Edit

Fields

§editor: Option<String>

Defines the editor to be used for that run, overriding the quartz settings.

Open an editor to modify endpoint in use

§

Url

Fields

Manage current handle’s endpoint URL

§

Method

Manage current handle’s endpoint method

§

Query

Manage current handle’s endpoint query params

§

Header

Fields

§set: Vec<String>

Add new header entry in “key: value” format

§get: Option<String>

Print a header value

§remove: Vec<String>

Remove a header

§list: bool

Print headers

Manage current handle’s endpoint headers

§

Body

Fields

§stdin: bool

Expect a new request body via standard input

§edit: bool

Open an editor to modify the endpoint’s request body

§print: bool

Print request body

Manage current handle’s endpoint request body

§

History

Fields

§max_count: Option<usize>

Maximum number of requests to be listed

§date: Option<String>

Format date time output

Print request history

§

Context

Fields

§

Variable

Fields

§get: Option<String>

Print a variable value

§set: Vec<String>

Set a variable: key=value

§list: bool

Print all variables

§edit: bool

Open an editor to modify the context variables file

Manage current context’s variables

§

Config

Fields

Manage configuration for quartz

Trait Implementations§

source§

impl Debug for Commands

source§

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

Formats the value using the given formatter. Read more
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. Read more
source§

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

Append to [Command] so it can update self. 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 Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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> 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 Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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