pub struct SourceMapBuilder { /* private fields */ }Expand description
Builder for incrementally constructing a SourceMap from iterators.
Avoids the need to pre-collect sources, names, and mappings into Vecs.
Delegates to SourceMap::from_parts internally.
Implementations§
Source§impl SourceMapBuilder
impl SourceMapBuilder
pub fn new() -> Self
pub fn file(self, file: impl Into<String>) -> Self
pub fn source_root(self, root: impl Into<String>) -> Self
pub fn sources( self, sources: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn sources_content( self, content: impl IntoIterator<Item = Option<impl Into<String>>>, ) -> Self
pub fn names(self, names: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn mappings(self, mappings: impl IntoIterator<Item = Mapping>) -> Self
pub fn ignore_list(self, list: impl IntoIterator<Item = u32>) -> Self
pub fn debug_id(self, id: impl Into<String>) -> Self
pub fn scopes(self, scopes: ScopeInfo) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SourceMapBuilder
impl RefUnwindSafe for SourceMapBuilder
impl Send for SourceMapBuilder
impl Sync for SourceMapBuilder
impl Unpin for SourceMapBuilder
impl UnsafeUnpin for SourceMapBuilder
impl UnwindSafe for SourceMapBuilder
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