pub struct RewriteOptions<'a> {
    pub with_names: bool,
    pub with_source_contents: bool,
    pub load_local_source_contents: bool,
    pub base_path: Option<&'a Path>,
    pub strip_prefixes: &'a [&'a str],
}
Expand description

Controls the SourceMap::rewrite behavior

Default configuration:

  • with_names: true
  • with_source_contents: true
  • load_local_source_contents: false

Fields§

§with_names: bool

If enabled, names are kept in the rewritten sourcemap.

§with_source_contents: bool

If enabled source contents are kept in the sourcemap.

§load_local_source_contents: bool

If enabled local source contents that are not in the file are automatically inlined.

§base_path: Option<&'a Path>

The base path to the used for source reference resolving when loading local source contents is used.

§strip_prefixes: &'a [&'a str]

Optionally strips common prefixes from the sources. If an item in the list is set to ~ then the common prefix of all sources is stripped.

Trait Implementations§

source§

impl<'a> Clone for RewriteOptions<'a>

source§

fn clone(&self) -> RewriteOptions<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for RewriteOptions<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Default for RewriteOptions<'a>

source§

fn default() -> RewriteOptions<'a>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for RewriteOptions<'a>

§

impl<'a> Send for RewriteOptions<'a>

§

impl<'a> Sync for RewriteOptions<'a>

§

impl<'a> Unpin for RewriteOptions<'a>

§

impl<'a> UnwindSafe for RewriteOptions<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.