pub struct Env<'a> {
pub base: PathBuf,
pub glass_dirs: Vec<PathBuf>,
pub catalog: Option<&'a dyn Fn(&str, &str) -> Result<String, Error>>,
pub step_files: Option<&'a (dyn Fn(&str, &str) -> Option<PathBuf> + Sync)>,
}Expand description
展開の環境(既定はフォルダ・カタログ・STEP の口なし)
Fields§
§base: PathBuf相対パスの基準(プロジェクトファイルのフォルダ)
glass_dirs: Vec<PathBuf>§catalog: Option<&'a dyn Fn(&str, &str) -> Result<String, Error>>§step_files: Option<&'a (dyn Fn(&str, &str) -> Option<PathBuf> + Sync)>カタログの機構部品の詳しい形の STEP(lensbench_core::mech::MechPart::step)を引く口。None なら引かない
(描画・書き出しは簡易外形。以前はキャッシュのフォルダをこのクレートの中で決めて探していた)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Env<'a>
impl<'a> !Send for Env<'a>
impl<'a> !Sync for Env<'a>
impl<'a> !UnwindSafe for Env<'a>
impl<'a> Freeze for Env<'a>
impl<'a> Unpin for Env<'a>
impl<'a> UnsafeUnpin for Env<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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