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§
Sourcefn to_file_id(&self, db: &dyn FilesGroup) -> Result<FileId>
fn to_file_id(&self, db: &dyn FilesGroup) -> Result<FileId>
Converts the input to a FileId
that can be used by the formatter.
Sourcefn overwrite_content(&self, _content: String) -> Result<()>
fn overwrite_content(&self, _content: String) -> Result<()>
Overwrites the content of the input with the given string.