pub struct SourceMaps { /* private fields */ }Expand description
The modules of an ets/sourceMaps.map, by the record compiled from each.
It holds no part of the file: the bytes are passed again to read a module.
Implementations§
Source§impl SourceMaps
impl SourceMaps
Sourcepub fn index(bytes: &[u8]) -> Result<SourceMaps, SourceMapError>
pub fn index(bytes: &[u8]) -> Result<SourceMaps, SourceMapError>
Find the members of the table in bytes. Their values are skipped,
not parsed.
§Errors
SourceMapError::Malformed when bytes is not a JSON object, or
ends inside one.
Sourcepub fn heap_bytes(&self) -> usize
pub fn heap_bytes(&self) -> usize
Bytes the index takes on the heap, roughly: its tables by their capacity and the keys they own, without the allocator’s overhead.
Sourcepub fn module(
&self,
bytes: &[u8],
record: &str,
) -> Option<Result<ModuleMap, SourceMapError>>
pub fn module( &self, bytes: &[u8], record: &str, ) -> Option<Result<ModuleMap, SourceMapError>>
The source map of the module record record was compiled from
(&entry/src/main/ets/pages/Index&, &@scope/lib/Index&1.0.0,
com.example.app/entry/ets/pages/Index), read from bytes, the file
this was indexed from. None when the table has no such module.
§Errors
SourceMapError::Module when the value is not a source map.
Trait Implementations§
Source§impl Clone for SourceMaps
impl Clone for SourceMaps
Source§impl Debug for SourceMaps
impl Debug for SourceMaps
Source§impl Default for SourceMaps
impl Default for SourceMaps
impl Eq for SourceMaps
Source§impl PartialEq for SourceMaps
impl PartialEq for SourceMaps
impl StructuralPartialEq for SourceMaps
Auto Trait Implementations§
impl Forget for SourceMaps
impl Freeze for SourceMaps
impl Move for SourceMaps
impl RefUnwindSafe for SourceMaps
impl Send for SourceMaps
impl Sync for SourceMaps
impl Unpin for SourceMaps
impl UnsafeUnpin for SourceMaps
impl UnwindSafe for SourceMaps
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