pub struct SourceCache { /* private fields */ }Expand description
展開でファイル・カタログから読んだものの使い回し(ExpandOpts::cache)。
- カタログの玉: (メーカー, 型番) → (玉, 玉の .zmx のガラス)
.zmx・系ファイルのブロック: (正規化したパス, 構成番号) → 系。ファイルの更新時刻と大きさが変われば読み直す
同じ環境(ガラスのフォルダ・カタログ)の展開の間だけで使う。状態・経路・差し替えの組・GUI の編集ごとの展開が、 同じファイルを読んで解析し直さないため(入れ子のプロジェクトは中の葉だけ覚える)
Implementations§
Source§impl SourceCache
impl SourceCache
Sourcepub fn file_count(&self) -> usize
pub fn file_count(&self) -> usize
覚えているファイルの数(試験用)
Sourcepub fn scope(&self, key: &str)
pub fn scope(&self, key: &str)
環境(ガラスのフォルダ・レンズカタログなど)を表す文字列 key が前と違えば、覚えたものを捨てる。
環境を変えうる呼び手(crate::open::Source)が展開の前に呼ぶ
Trait Implementations§
Source§impl Debug for SourceCache
impl Debug for SourceCache
Auto Trait Implementations§
impl !Freeze for SourceCache
impl RefUnwindSafe for SourceCache
impl Send for SourceCache
impl Sync for SourceCache
impl Unpin for SourceCache
impl UnsafeUnpin for SourceCache
impl UnwindSafe for SourceCache
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