pub struct StorageHeader {
pub major_version: u16,
pub minor_version: u16,
pub block_size: BlockSize,
pub instance_uuid: Uuid,
pub journal_region_size: u64,
pub data_region_size: u64,
}
メジャーバージョン.
メジャーバージョンが異なるストレージ同士のデータ形式には互換性が無い.
現在の最新バージョンはMAJOR_VERSION
.
マイナーバージョン.
マイナーバージョンには、後方互換性がある
(i.e., 古い形式で作成されたストレージを、新しいプログラムで扱うことが可能).
現在の最新バージョンはMINOR_VERSION
.
ストレージの特定のインスタンスを識別するためのUUID.
ストレージが使用する領域全体のサイズを返す.
内訳としては ヘッダ領域 と ジャーナル領域 、 データ領域 のサイズの合計となる.
ヘッダ領域のサイズを返す.
ヘッダ領域 には、以下が含まれる:
- マジックナンバー
- ヘッダ長
StorageHeader
- 領域のサイズをブロック境界に揃えるためのパディング
存在するLump Storageから
保存済みのストレージヘッダを取り出す。
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static