pub struct Args {
pub command: CommandType,
pub project_name: Option<String>,
pub template_type: Option<TemplateType>,
pub model_sub_type: Option<ModelSubType>,
pub component_name: Option<String>,
pub fmt_check: bool,
pub fmt_path: Option<PathBuf>,
}Expand description
Parsed command line arguments
hyperlane-cli ships both a library and a hyperlane binary; the binary
is a separate crate that consumes this one, so the read path must stay
pub (§17.18 exempts a struct the package’s own binary target reads).
Fields§
§command: CommandTypeThe command to execute
project_name: Option<String>Project name for new command
template_type: Option<TemplateType>Template type for template command
model_sub_type: Option<ModelSubType>Model subtype for template command (only when template_type is Model)
component_name: Option<String>Component name for template command
fmt_check: boolVerify formatting without writing files for the fmt command
fmt_path: Option<PathBuf>Optional target directory or file path for the fmt command
Implementations§
Source§impl Args
impl Args
pub fn get_command(&self) -> CommandType
pub fn get_mut_command(&mut self) -> &mut CommandType
pub fn set_command(&mut self, val: CommandType) -> &mut Self
pub fn get_project_name(&self) -> Option<String>
pub fn try_get_project_name(&self) -> Option<String>
pub fn get_mut_project_name(&mut self) -> &mut Option<String>
pub fn set_project_name(&mut self, val: Option<String>) -> &mut Self
pub fn get_template_type(&self) -> Option<TemplateType>
pub fn try_get_template_type(&self) -> Option<TemplateType>
pub fn get_mut_template_type(&mut self) -> &mut Option<TemplateType>
pub fn set_template_type(&mut self, val: Option<TemplateType>) -> &mut Self
pub fn get_model_sub_type(&self) -> Option<ModelSubType>
pub fn try_get_model_sub_type(&self) -> Option<ModelSubType>
pub fn get_mut_model_sub_type(&mut self) -> &mut Option<ModelSubType>
pub fn set_model_sub_type(&mut self, val: Option<ModelSubType>) -> &mut Self
pub fn get_component_name(&self) -> Option<String>
pub fn try_get_component_name(&self) -> Option<String>
pub fn get_mut_component_name(&mut self) -> &mut Option<String>
pub fn set_component_name(&mut self, val: Option<String>) -> &mut Self
pub fn get_fmt_check(&self) -> bool
pub fn get_mut_fmt_check(&mut self) -> &mut bool
pub fn set_fmt_check(&mut self, val: bool) -> &mut Self
pub fn get_fmt_path(&self) -> Option<PathBuf>
pub fn try_get_fmt_path(&self) -> Option<PathBuf>
pub fn get_mut_fmt_path(&mut self) -> &mut Option<PathBuf>
pub fn set_fmt_path(&mut self, val: Option<PathBuf>) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Forget for Args
impl Freeze for Args
impl Move for Args
impl RefUnwindSafe for Args
impl Send for Argswhere
RawVecInner: Send,
impl Sync for Argswhere
RawVecInner: Sync,
impl Unpin for Args
impl UnsafeUnpin for Args
impl UnwindSafe for Argswhere
RawVecInner: UnwindSafe,
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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