Type Alias rspack_sources::BoxSource

source ·
pub type BoxSource = Arc<dyn Source>;
Expand description

An alias for Box<dyn Source>.

Aliased Type§

struct BoxSource { /* private fields */ }

Trait Implementations§

source§

impl Source for BoxSource

source§

fn source(&self) -> Cow<'_, str>

Get the source code.
source§

fn buffer(&self) -> Cow<'_, [u8]>

Get the source buffer.
source§

fn size(&self) -> usize

Get the size of the source.
source§

fn map(&self, options: &MapOptions) -> Option<SourceMap>

Get the SourceMap.
source§

fn to_writer(&self, writer: &mut dyn Write) -> Result<()>

Writes the source into a writer, preferably a std::io::BufWriter<std::io::Write>.
source§

fn update_hash(&self, state: &mut dyn Hasher)

Update hash based on the source.
source§

impl StreamChunks for BoxSource

source§

fn stream_chunks( &self, options: &MapOptions, on_chunk: OnChunk<'_>, on_source: OnSource<'_>, on_name: OnName<'_> ) -> GeneratedInfo

StreamChunks abstraction