pub struct EszipV2 {
    pub ordered_modules: Vec<String>,
    /* private fields */
}
Expand description

Version 2 of the Eszip format. This format supports streaming sources and source maps.

Fields

ordered_modules: Vec<String>

Implementations

Parse a EszipV2 from an AsyncRead stream. This function returns once the header section of the eszip has been parsed. Once this function returns, the data section will not necessarially have been parsed yet. To parse the data section, poll/await the future returned in the second tuple slot.

Add an import map to the eszip archive. The import map will always be placed at the top of the archive, so it can be read before any other modules are loaded.

If a module with this specifier is already present, then this is a no-op (except that this specifier will now be at the top of the archive).

Serialize the eszip archive into a byte buffer.

Turn a deno_graph::ModuleGraph into an EszipV2. All modules from the graph will be transpiled and stored in the eszip archive.

The ordering of the modules in the graph is dependant on the module graph tree. The root module is added to the top of the archive, and the leaves to the end. This allows for efficient deserialization of the archive right into an isolate.

Get the module metadata for a given module specifier. This function will follow redirects. The returned module has functions that can be used to obtain the module source and source map.

Trait Implementations

Formats the value using the given formatter. Read more

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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more