pub struct SourceMap {
pub entries: Vec<SourceMapEntry>,
}Expand description
A complete source map for a compiled PEPL module.
Fields§
§entries: Vec<SourceMapEntry>Implementations§
Source§impl SourceMap
impl SourceMap
pub fn new() -> Self
Sourcepub fn push(
&mut self,
wasm_func_index: u32,
func_name: impl Into<String>,
kind: FuncKind,
span: Span,
)
pub fn push( &mut self, wasm_func_index: u32, func_name: impl Into<String>, kind: FuncKind, span: Span, )
Push a new entry.
Sourcepub fn find_by_func_index(&self, idx: u32) -> Option<&SourceMapEntry>
pub fn find_by_func_index(&self, idx: u32) -> Option<&SourceMapEntry>
Look up the entry whose WASM function index matches.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SourceMap
impl<'de> Deserialize<'de> for SourceMap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SourceMap
impl RefUnwindSafe for SourceMap
impl Send for SourceMap
impl Sync for SourceMap
impl Unpin for SourceMap
impl UnwindSafe for SourceMap
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