struct ListCache {
generation: u64,
root: u32,
files: Vec<FileMetadata>,
by_label: BTreeMap<String, Vec<u32>>,
}Expand description
ある世代の、生きているファイルの一覧とラベルの索引(2026-11-12)。
以前は list_files・find_by_label(s)・list_all_labels・list_dir のたびに名前の索引を全部たどり、
ファイル 1 個につき 1 セクタ以上を記憶装置から読んでいた(ファイルアプリは描き直しのたびに呼ぶ)。
変更が無い間は読み直さず、ラベルからは索引で引く。
Fields§
§generation: u64§root: u32§files: Vec<FileMetadata>§by_label: BTreeMap<String, Vec<u32>>ラベル(前後の空白を除いた物。ラベルの無いファイルは空文字列)→ files の添字(昇順)。
Auto Trait Implementations§
impl Freeze for ListCache
impl RefUnwindSafe for ListCache
impl Send for ListCache
impl Sync for ListCache
impl Unpin for ListCache
impl UnsafeUnpin for ListCache
impl UnwindSafe for ListCache
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