tinymist_vfs

Trait PathAccessModel

Source
pub trait PathAccessModel {
    // Required method
    fn content(&self, src: &Path) -> FileResult<Bytes>;

    // Provided method
    fn reset(&mut self) { ... }
}
Expand description

A trait for accessing underlying file system.

This trait is simplified by Vfs and requires a minimal method set for typst compilation.

Required Methods§

Source

fn content(&self, src: &Path) -> FileResult<Bytes>

Return the content of a file entry.

Provided Methods§

Source

fn reset(&mut self)

Clear the cache of the access model.

This is called when the vfs is reset. See Vfs’s reset method for more information.

Implementors§