pub trait FileSystem {
// Required methods
fn walk_markdown(&self, root: &Path) -> Result<Vec<String>>;
fn stat(&self, root: &Path, path: &str) -> Result<Option<FileStat>>;
fn read(&self, root: &Path, path: &str) -> Result<Option<String>>;
// Provided methods
fn exists(&self, root: &Path, path: &str) -> Result<bool> { ... }
fn doc_store(&self, _root: &Path) -> Option<Box<dyn DocStore>> { ... }
}Expand description
Where the fast path’s bytes come from. Paths are repo-relative with /
separators; every method takes the repo root.
Required Methods§
Sourcefn walk_markdown(&self, root: &Path) -> Result<Vec<String>>
fn walk_markdown(&self, root: &Path) -> Result<Vec<String>>
§4.2: every regular file named *.md at any depth under root,
skipping IGNORED_DIRS, depth-first with each directory’s entries
in bytewise name order.
Provided Methods§
Sourcefn doc_store(&self, _root: &Path) -> Option<Box<dyn DocStore>>
fn doc_store(&self, _root: &Path) -> Option<Box<dyn DocStore>>
The write seam over the same tree (spec/sync §4.3 step 0, store
14.0): the DocStore the sweep and recovery replay pending
materializations through. None for a filesystem that cannot write
(the in-memory fixture one), in which case step 0 is skipped — the
rows stay for a materializer that can.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".