pub trait ToCells {
// Required method
fn to_cells(&self, output: &mut CellStream);
// Provided method
fn to_cell_stream(&self, source_id: SourceId) -> CellStream { ... }
}Expand description
Emits syntax as the linear sequence of cells evaluated at global scope.
This is the global-scope counterpart of ToTokens. Implementations append
to an existing stream so independently produced cell fragments compose
without intermediate allocation.
Required Methods§
Sourcefn to_cells(&self, output: &mut CellStream)
fn to_cells(&self, output: &mut CellStream)
Appends this value’s global cells to output.
Provided Methods§
Sourcefn to_cell_stream(&self, source_id: SourceId) -> CellStream
fn to_cell_stream(&self, source_id: SourceId) -> CellStream
Emits this value into a fresh cell stream with the requested identity.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".