pub struct PathMapping {
pub root: PathBuf,
pub placeholder: String,
}Expand description
Mapping from a host-specific absolute root to a stable key placeholder.
Fields§
§root: PathBufAbsolute host path to replace.
placeholder: StringPlaceholder name without the surrounding ${...} syntax.
Implementations§
Source§impl PathMapping
impl PathMapping
Sourcepub fn new(root: impl Into<PathBuf>, placeholder: impl Into<String>) -> Self
pub fn new(root: impl Into<PathBuf>, placeholder: impl Into<String>) -> Self
Map an absolute host path to a stable cache-key placeholder.
Sourcepub fn ordered(mappings: &[PathMapping]) -> Vec<PathMapping>
pub fn ordered(mappings: &[PathMapping]) -> Vec<PathMapping>
Order mappings deepest root first, which is what normalization needs: a target directory inside the workspace has to win over the workspace.
Trait Implementations§
Source§impl Clone for PathMapping
impl Clone for PathMapping
Source§fn clone(&self) -> PathMapping
fn clone(&self) -> PathMapping
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PathMapping
impl Debug for PathMapping
impl Eq for PathMapping
Source§impl PartialEq for PathMapping
impl PartialEq for PathMapping
impl StructuralPartialEq for PathMapping
Auto Trait Implementations§
impl Freeze for PathMapping
impl RefUnwindSafe for PathMapping
impl Send for PathMapping
impl Sync for PathMapping
impl Unpin for PathMapping
impl UnsafeUnpin for PathMapping
impl UnwindSafe for PathMapping
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