virtual_fs::limiter

Trait FsMemoryLimiter

Source
pub trait FsMemoryLimiter:
    Send
    + Sync
    + Debug {
    // Required methods
    fn on_grow(&self, grown_bytes: usize) -> Result<(), FsError>;
    fn on_shrink(&self, shrunk_bytes: usize);
}
Expand description

Allows tracking and limiting the memory usage of a memfs [FileSystem].

Required Methods§

Source

fn on_grow(&self, grown_bytes: usize) -> Result<(), FsError>

Source

fn on_shrink(&self, shrunk_bytes: usize)

Implementors§