pub trait PklModuleReader {
// Required methods
fn scheme(&self) -> &str;
fn is_local(&self) -> bool;
fn read(&self, uri: &str) -> Result<String, Box<dyn Error>>;
fn list(&self, uri: &str) -> Result<Vec<PathElements>, Box<dyn Error>>;
// Provided methods
fn has_hierarchical_uris(&self) -> bool { ... }
fn is_globbable(&self) -> bool { ... }
}Required Methods§
Sourcefn scheme(&self) -> &str
fn scheme(&self) -> &str
Scheme returns the scheme part of the URL that this reader can read.
The value should be the URI scheme up to (not including) :
Sourcefn is_local(&self) -> bool
fn is_local(&self) -> bool
Tells whether the module is local to the system.
A local resource that [hasHierarchicalUris] supports triple-dot imports.
Provided Methods§
Sourcefn has_hierarchical_uris(&self) -> bool
fn has_hierarchical_uris(&self) -> bool
Tells whether the path part of ths URI has a hier-part.
An example of a hierarchical URI is file:///path/to/my/file, where
/path/to/my/file designates a nested path through the / character.
An example of a non-hierarchical URI is pkl.base, where the base does not denote
any form of hierarchy.
Sourcefn is_globbable(&self) -> bool
fn is_globbable(&self) -> bool
Tells whether this reader supports globbing.