Struct swc_common::source_map::FilePathMapping
source · [−]pub struct FilePathMapping { /* private fields */ }
Implementations
sourceimpl FilePathMapping
impl FilePathMapping
pub fn empty() -> FilePathMapping
pub fn new(mapping: Vec<(PathBuf, PathBuf)>) -> FilePathMapping
sourcepub fn map_prefix(&self, path: PathBuf) -> (PathBuf, bool)
pub fn map_prefix(&self, path: PathBuf) -> (PathBuf, bool)
Applies any path prefix substitution as defined by the mapping. The return value is the remapped path and a boolean indicating whether the path was affected by the mapping.
Trait Implementations
sourceimpl Clone for FilePathMapping
impl Clone for FilePathMapping
sourcefn clone(&self) -> FilePathMapping
fn clone(&self) -> FilePathMapping
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Default for FilePathMapping
impl Default for FilePathMapping
sourcefn default() -> FilePathMapping
fn default() -> FilePathMapping
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for FilePathMapping
impl Send for FilePathMapping
impl Sync for FilePathMapping
impl Unpin for FilePathMapping
impl UnwindSafe for FilePathMapping
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more