pub trait TreeSource {
// Required methods
fn read(&self, path: &str) -> Option<Vec<u8>>;
fn is_file(&self, path: &str) -> bool;
fn is_dir(&self, path: &str) -> bool;
fn children(&self, dir: &str) -> Vec<String>;
}Expand description
Read access to a package tree through normalized package-relative paths.
Paths use / separators, are never absolute, and contain no empty, . or
.. components. The empty path names the tree root for directory queries.
Required Methods§
fn read(&self, path: &str) -> Option<Vec<u8>>
fn is_file(&self, path: &str) -> bool
fn is_dir(&self, path: &str) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".