pub struct SafetyFlags {
pub read_only: bool,
pub yes: bool,
pub dry_run: bool,
pub max_affected: Option<u64>,
pub no_input: bool,
pub accept_unverified_tls: bool,
}Expand description
Guards against unintended change.
Fields§
§read_only: boolRefuse any change before opening the connection.
yes: boolConfirm a destructive operation.
--force is the same flag under the name other tools use for the same
act of confirming. It is deliberately NOT a way past any guard: an
invocation that refuses every change still refuses one, a statement with
no restriction is still refused, and a command with no simulation still
says so. What this flag settles is that the caller meant it, and nothing
else, whichever of the two names was written.
dry_run: boolShow what would be done without doing it.
max_affected: Option<u64>Ceiling on rows one change may affect.
no_input: boolRefuse any question and fail instead of waiting.
accept_unverified_tls: boolTake the risk of an unverified server certificate, for this invocation.
A stored key alone does not turn certificate verification off. The setting says which level to check at; this says the caller knows what checking at that level leaves open. Requiring both is what stops a configuration file written months ago, for a laboratory server, from quietly following the caller to a real one.
Trait Implementations§
Source§impl Args for SafetyFlags
impl Args for SafetyFlags
Source§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 SafetyFlags
impl Clone for SafetyFlags
Source§impl Debug for SafetyFlags
impl Debug for SafetyFlags
Source§impl FromArgMatches for SafetyFlags
impl FromArgMatches for SafetyFlags
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.