Skip to main content

ListCache

Struct ListCache 

Source
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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.