Struct slicec::slice_options::SliceOptions
source · pub struct SliceOptions {
pub sources: Vec<String>,
pub references: Vec<String>,
pub defined_symbols: Vec<String>,
pub allowed_lints: Vec<String>,
pub dry_run: bool,
pub output_dir: Option<String>,
pub diagnostic_format: DiagnosticFormat,
pub disable_color: bool,
}Expand description
This struct is responsible for parsing the command line options common to all slice compilers.
The option parsing capabilities are generated on the struct by the clap macro.
Fields§
§sources: Vec<String>List of Slice files to compile.
references: Vec<String>Add a directory or Slice file to the list of references.
defined_symbols: Vec<String>Define a preprocessor symbol.
allowed_lints: Vec<String>Instruct the compiler to allow the specified lint.
dry_run: boolValidate input files without generating code for them.
output_dir: Option<String>Set the output directory for the generated code. Defaults to the current working directory.
diagnostic_format: DiagnosticFormatSet which format to emit errors and warnings with.
disable_color: boolDisable ANSI color codes in diagnostic output.
Trait Implementations§
source§impl Args for SliceOptions
impl Args for SliceOptions
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
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
source§impl CommandFactory for SliceOptions
impl CommandFactory for SliceOptions
source§impl Debug for SliceOptions
impl Debug for SliceOptions
source§impl Default for SliceOptions
impl Default for SliceOptions
source§fn default() -> SliceOptions
fn default() -> SliceOptions
Returns the “default value” for a type. Read more
source§impl FromArgMatches for SliceOptions
impl FromArgMatches for SliceOptions
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(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches to self.source§impl Hash for SliceOptions
impl Hash for SliceOptions
source§impl Parser for SliceOptions
impl Parser for SliceOptions
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, [exit][Error::exit] on error.
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Update from iterator, [exit][Error::exit] on error.
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Update from iterator, return Err on error.
Auto Trait Implementations§
impl RefUnwindSafe for SliceOptions
impl Send for SliceOptions
impl Sync for SliceOptions
impl Unpin for SliceOptions
impl UnwindSafe for SliceOptions
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