pub struct CliOptions { /* private fields */ }Expand description
Options for the command line that a host runs: the models, the host’s build, the command name and the help text’s opening line.
Implementations§
Source§impl CliOptions
impl CliOptions
Sourcepub fn new(models: ModelSet, host: BuildInfo) -> Self
pub fn new(models: ModelSet, host: BuildInfo) -> Self
Returns options that run models and record host as the build that ran each sweep.
The command name defaults to the package name host records, and --version prints its version. The help
text opens with henad-cli’s own description until Self::about replaces it.
Sourcepub fn command_name(self, name: impl Into<String>) -> Self
pub fn command_name(self, name: impl Into<String>) -> Self
Sets the command name that --version, the help text and the usage lines show.
The usage lines use this name instead of the program name that the command line starts with.
Trait Implementations§
Source§impl Clone for CliOptions
impl Clone for CliOptions
Auto Trait Implementations§
impl !RefUnwindSafe for CliOptions
impl !UnwindSafe for CliOptions
impl Freeze for CliOptions
impl Send for CliOptions
impl Sync for CliOptions
impl Unpin for CliOptions
impl UnsafeUnpin for CliOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more