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§