cairo_lang_formatter::cairo_formatter

Trait FormattableInput

Source
pub trait FormattableInput {
    // Required methods
    fn to_file_id(&self, db: &dyn FilesGroup) -> Result<FileId>;
    fn overwrite_content(&self, _content: String) -> Result<()>;
}
Expand description

A trait for types that can be used as input for the cairo formatter.

Required Methods§

Source

fn to_file_id(&self, db: &dyn FilesGroup) -> Result<FileId>

Converts the input to a FileId that can be used by the formatter.

Source

fn overwrite_content(&self, _content: String) -> Result<()>

Overwrites the content of the input with the given string.

Implementations on Foreign Types§

Source§

impl FormattableInput for &Path

Source§

fn to_file_id(&self, db: &dyn FilesGroup) -> Result<FileId>

Source§

fn overwrite_content(&self, content: String) -> Result<()>

Source§

impl FormattableInput for String

Source§

fn to_file_id(&self, db: &dyn FilesGroup) -> Result<FileId>

Source§

fn overwrite_content(&self, _content: String) -> Result<()>

Implementors§