ekv-fs 0.2.0

A chunked, #![no_std] Virtual File System built on top of the Embassy ekv key-value store.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! On-disk metadata for a stored file.

use serde::{Deserialize, Serialize};

/// Serialized metadata stored under the `m:{path}` key.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct FileMeta {
    /// Total file size in bytes.
    pub size: usize,
    /// Number of chunk keys (`c:{path}:{i}`) for this file.
    pub chunks: usize,
}

/// Stack buffer large enough for postcard-encoded [`FileMeta`].
pub(crate) const META_BUF_LEN: usize = 32;