pub struct ExportArgs {
pub to: Option<PathBuf>,
pub table: Vec<String>,
pub structure_only: bool,
pub max_bytes: Option<usize>,
}Expand description
Producing a logical copy.
Consistency across tables comes from a transaction with a consistent snapshot, so no reader or writer is ever blocked. When the storage engine cannot provide one, the copy still runs and the gap is declared.
Fields§
§to: Option<PathBuf>Where to write the copy.
Named --to and NOT --output, because --output is a global flag
meaning “write this invocation’s answer to a file”. Two declarations of
one long name are matched by the argument layer as a single argument, so
the value reached both: the copy was written to that path and then the
single output destination wrote its own receipt over it, destroying the
copy. The two destinations are separate things and now say so.
Optional to the argument layer and required to the command. Publishing the contract must cost nothing, and a caller asking what this command answers should not have to invent a destination first. Absence is refused where the copy is actually run, and carries a code.
table: Vec<String>Restrict to these tables.
structure_only: boolCopy the structure only, without any row.
max_bytes: Option<usize>Ceiling on the volume of the copy, in bytes.
Reaching it removes the partial file rather than leaving it where the finished one belongs, so a copy that stopped early is never mistaken for a copy that finished.
Trait Implementations§
Source§impl Args for ExportArgs
impl Args for ExportArgs
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 ExportArgs
impl Clone for ExportArgs
Source§impl Debug for ExportArgs
impl Debug for ExportArgs
Source§impl FromArgMatches for ExportArgs
impl FromArgMatches for ExportArgs
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.