pub struct MapPathResolver {
pub links: BTreeMap<String, String>,
pub files: Vec<String>,
}Expand description
In-memory resolver for tests and conformance fixtures: symlink path → target, and the files that exist. The longest link that is the path itself or one of its ancestors is replaced by its target.
Fields§
§links: BTreeMap<String, String>Symlink path → target.
files: Vec<String>Absolute paths of existing files; they and their ancestor directories
are what PathResolver::read_dir lists.
Trait Implementations§
Source§impl Clone for MapPathResolver
impl Clone for MapPathResolver
Source§impl Debug for MapPathResolver
impl Debug for MapPathResolver
Source§impl Default for MapPathResolver
impl Default for MapPathResolver
Source§impl PathResolver for MapPathResolver
impl PathResolver for MapPathResolver
Source§fn resolve(&self, path: &str) -> Option<String>
fn resolve(&self, path: &str) -> Option<String>
The path
path really refers to, or None when it is the same path or
cannot be resolved. Paths that do not exist yet resolve through their
deepest existing ancestor, so a new file written into a symlinked
directory still resolves to where it would land.Auto Trait Implementations§
impl Freeze for MapPathResolver
impl RefUnwindSafe for MapPathResolver
impl Send for MapPathResolver
impl Sync for MapPathResolver
impl Unpin for MapPathResolver
impl UnsafeUnpin for MapPathResolver
impl UnwindSafe for MapPathResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more