pub enum KeysOperation {
Add {
key: String,
},
List,
Remove {
index: usize,
},
Clear {
yes: bool,
},
Path,
Import {
file: PathBuf,
},
Export,
}Expand description
Operations available under the keys subcommand.
Variants§
Add
Add an API key to XDG storage.
List
List all stored keys (masked).
Remove
Remove a key by 1-based index (use keys list to see indices).
Clear
Remove all stored keys.
Path
Print the XDG config file path.
Import
Import keys from a .env file (reads CONTEXT7_API= entries).
Export
Export all keys to stdout (one per line, unmasked).
Trait Implementations§
Source§impl Debug for KeysOperation
impl Debug for KeysOperation
Source§impl FromArgMatches for KeysOperation
impl FromArgMatches for KeysOperation
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
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>
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 KeysOperation
impl Subcommand for KeysOperation
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
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 moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for KeysOperation
impl RefUnwindSafe for KeysOperation
impl Send for KeysOperation
impl Sync for KeysOperation
impl Unpin for KeysOperation
impl UnsafeUnpin for KeysOperation
impl UnwindSafe for KeysOperation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more