pub struct Common {
pub file: PathBuf,
pub glass_dir: Vec<PathBuf>,
pub lens_catalog: Vec<PathBuf>,
pub cfg: usize,
pub state: Option<String>,
pub path: Option<String>,
pub json: bool,
pub save: Option<PathBuf>,
pub strict_macros: bool,
}Expand description
系を読む解析の共通の引数(拡張のサブコマンドも #[command(flatten)] で使う、ext)
Fields§
§file: PathBufA .zmx file, or a project file (.json) built from blocks
glass_dir: Vec<PathBuf>Folders to search for glass catalogs (more than one allowed; LENSBENCH_GLASSCAT is also used)
lens_catalog: Vec<PathBuf>Lens catalogs for the catalog lenses (“vendor”, “part”) of a project file (.zmx files, or folders of .zmx; the folder name is the maker and the file name is the part number; more than one allowed)
cfg: usizeMulti-configuration number (from 1)
state: Option<String>State name of a project file (.json) (like a multi-configuration)
path: Option<String>Beam splitter path of a project file (T and R in the order the BSs are passed, e.g. TR; if omitted, the project’s path and each BS’s arm)
json: boolOutput JSON
save: Option<PathBuf>File to write the result to (csv, json or npz by extension)
strict_macros: boolStop with an error when a ZPL macro solve of a .zmx can’t be solved (by default the value is the same as OpticStudio’s and a warning is shown)
Implementations§
Trait Implementations§
Source§impl Args for Common
impl Args for Common
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
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
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for Common
impl FromArgMatches for Common
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.Auto Trait Implementations§
impl Freeze for Common
impl RefUnwindSafe for Common
impl Send for Common
impl Sync for Common
impl Unpin for Common
impl UnsafeUnpin for Common
impl UnwindSafe for Common
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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