pub enum ApiKeyCommands {
List,
Create {
name: String,
scopes: Vec<ApiKeyScope>,
expires_at: Option<DateTime<Utc>>,
},
Scopes,
Delete {
id: Uuid,
yes: bool,
},
}Expand description
Available API key subcommands.
Variants§
List
List API keys. The raw key is never listed, only its prefix.
Create
Create an API key. The raw key is printed once and never again.
Fields
§
scopes: Vec<ApiKeyScope>Scope to grant. Repeat for several scopes. Run api-key scopes
to list the accepted values.
Scopes
List the scopes an API key can be granted.
Delete
Delete an API key.
Trait Implementations§
Source§impl Debug for ApiKeyCommands
impl Debug for ApiKeyCommands
Source§impl FromArgMatches for ApiKeyCommands
impl FromArgMatches for ApiKeyCommands
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 ApiKeyCommands
impl Subcommand for ApiKeyCommands
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 ApiKeyCommands
impl RefUnwindSafe for ApiKeyCommands
impl Send for ApiKeyCommands
impl Sync for ApiKeyCommands
impl Unpin for ApiKeyCommands
impl UnsafeUnpin for ApiKeyCommands
impl UnwindSafe for ApiKeyCommands
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