pub trait VirtualFileSystem:
Send
+ Sync
+ 'static {
// Required methods
fn contents(&self, url: &Url) -> Fallible<String>;
fn exists(&self, url: &Url) -> bool;
fn path_url(&self, path: &Path) -> Fallible<Url>;
fn url_display(&self, url: &Url) -> String;
}Required Methods§
Sourcefn contents(&self, url: &Url) -> Fallible<String>
fn contents(&self, url: &Url) -> Fallible<String>
Loads the contents of the given URL (or fail with a useful error).
Sourcefn path_url(&self, path: &Path) -> Fallible<Url>
fn path_url(&self, path: &Path) -> Fallible<Url>
(Try to) convert a path on the local file system to a URL
Sourcefn url_display(&self, url: &Url) -> String
fn url_display(&self, url: &Url) -> String
Return a string for the way we should display url to the user