Type Alias 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 rope(&self) -> Rope<'_>

Get the source code as a Rope.
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<'a>( &'a self, options: &MapOptions, on_chunk: OnChunk<'_, 'a>, on_source: OnSource<'_, 'a>, on_name: OnName<'_, 'a>, ) -> GeneratedInfo

StreamChunks abstraction