Skip to main content

sim_table_fs/
citizen.rs

1use sim_citizen_derive::Citizen;
2use sim_kernel::Symbol;
3
4/// Citizen descriptor identifying a filesystem-backed table by its root path.
5#[derive(Clone, Debug, Default, PartialEq, Citizen)]
6#[citizen(symbol = "table/FsDir", version = 0)]
7pub struct FsDirDescriptor {
8    /// Host filesystem path serving as the table root.
9    pub root: String,
10}
11
12/// Returns the `table/FsDir` class symbol for the filesystem table.
13///
14/// # Examples
15///
16/// ```
17/// use sim_table_fs::fs_dir_class_symbol;
18///
19/// assert_eq!(&*fs_dir_class_symbol().name, "FsDir");
20/// ```
21pub fn fs_dir_class_symbol() -> Symbol {
22    Symbol::qualified("table", "FsDir")
23}