AsCode

Trait AsCode 

Source
pub trait AsCode {
    // Required method
    fn as_code(&self) -> Result<Cow<'_, str>>;
}
Expand description

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§

Source

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

Converts the object to its code representation.

§Errors

qqq: doc

Implementors§