pub struct Cli { /* private fields */ }
Expand description
Command line interface for running a Ruleset
against a CSV file.
Implementations§
Source§impl Cli
impl Cli
Sourcepub fn new(ruleset: Ruleset) -> Cli
pub fn new(ruleset: Ruleset) -> Cli
Construct a new Cli
with default options.
use csv_sanity::Ruleset;
use csv_sanity::cli::{
Cli
};
let ruleset = Ruleset::new();
let cli = Cli::new(ruleset);
Sourcepub fn new_with_options(ruleset: Ruleset, options: Options) -> Cli
pub fn new_with_options(ruleset: Ruleset, options: Options) -> Cli
Construct a new Cli
with the specified options.
use csv_sanity::Ruleset;
use csv_sanity::cli::{
Cli,
Options,
CsvOptions
};
let ruleset = Ruleset::new();
let cli = Cli::new_with_options(ruleset, Options {
csv_options: CsvOptions {
delimiter: b',',
.. Default::default()
},
.. Default::default()
});
pub fn run<I: AsRef<Path>, O: AsRef<Path>, E: AsRef<Path>>( &self, input_file_path: I, output_file_name: O, error_file_name: E, )
Auto Trait Implementations§
impl Freeze for Cli
impl !RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnwindSafe for Cli
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