pub struct RemoveArgs {
pub ssid: String,
pub security_type: Option<SecurityTypeArg>,
pub credential_type: Option<CredentialTypeArg>,
pub credential: Option<String>,
}Expand description
Remove args are similar to SaveNetworkArgs but with optional security type and credential because it can match to saved networks with just SSID. Examples of valid arguments: –ssid MyNetwork –ssid MyNetwork –security-type wpa2 –ssid MyNetwork –credential MyPassword (defaults to credential-type: password) –ssid MyNetwork –credential-type password –credential MyPassword Example of invalid arguments: –ssid MyNetwork –security-type none –credential MyPassword –ssid MyNetwork –credential-type password
Fields§
§ssid: String§security_type: Option<SecurityTypeArg>§credential_type: Option<CredentialTypeArg>§credential: Option<String>Implementations§
Source§impl RemoveArgs
impl RemoveArgs
pub fn parse_security(&self) -> Option<SecurityType>
Sourcepub fn try_parse_credential(&self) -> Result<Option<Credential>, Error>
pub fn try_parse_credential(&self) -> Result<Option<Credential>, Error>
Determine the credential to use based on security_type, credential_type, and credential. If a value is provided without a type, Password will be used by default for open networks.
This includes a bunch of if statements for edge cases such as a credential being provided as “” or a credential type that conflicts with the credential value. But it does not check all input errors such as invalid PSK length or all conflicting security credential pairs.
Trait Implementations§
Source§impl Args for RemoveArgs
impl Args for RemoveArgs
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl Clone for RemoveArgs
impl Clone for RemoveArgs
Source§fn clone(&self) -> RemoveArgs
fn clone(&self) -> RemoveArgs
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RemoveArgs
impl Debug for RemoveArgs
Source§impl FromArgMatches for RemoveArgs
impl FromArgMatches for RemoveArgs
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>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.