pub trait AsCode {
// Required method
fn as_code(&self) -> Result<Cow<'_, str>>;
}Expand description
Entities of which spaces consists of. Source code. Entities of which spaces consists of. Source code. A trait for converting an object to its code representation.
The AsCode trait defines a method for converting an object into a code representation,
typically as a string. This can be useful for generating code from various data structures
or objects.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".