[−][src]Struct sourcemap::ram_bundle::RamBundle
The main RAM bundle interface
Implementations
impl<'a> RamBundle<'a>
[src]
pub fn parse_indexed_from_slice(bytes: &'a [u8]) -> Result<Self>
[src]
Parses an indexed RAM bundle from the given slice
pub fn parse_indexed_from_vec(bytes: Vec<u8>) -> Result<Self>
[src]
Parses an indexed RAM bundle from the given vector
pub fn parse_indexed_from_path(path: &Path) -> Result<Self>
[src]
Creates a new indexed RAM bundle from the file path
pub fn parse_unbundle_from_path(bundle_path: &Path) -> Result<Self>
[src]
Creates a file (unbundle) RAM bundle from the path
The provided path should point to a javascript file, that serves as an entry point (startup code) for the app. The modules are stored in js-modules/ directory, next to the entry point.
pub fn bundle_type(&self) -> RamBundleType
[src]
Returns the type of the RAM bundle.
pub fn get_module(&self, id: usize) -> Result<Option<RamBundleModule>>
[src]
Looks up a module by ID in the bundle
pub fn module_count(&self) -> usize
[src]
Returns the number of modules in the bundle
pub fn startup_code(&self) -> Result<&[u8]>
[src]
Returns the startup code
pub fn iter_modules(&self) -> RamBundleModuleIterⓘImportant traits for RamBundleModuleIter<'a>
impl<'a> Iterator for RamBundleModuleIter<'a> type Item = Result<RamBundleModule<'a>>;
[src]
Important traits for RamBundleModuleIter<'a>
impl<'a> Iterator for RamBundleModuleIter<'a> type Item = Result<RamBundleModule<'a>>;
Returns an iterator over all modules in the bundle
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for RamBundle<'a>
impl<'a> Send for RamBundle<'a>
impl<'a> Sync for RamBundle<'a>
impl<'a> Unpin for RamBundle<'a>
impl<'a> UnwindSafe for RamBundle<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,