Function dioxus_autofmt::fmt_file

source ·
pub fn fmt_file(contents: &str) -> Vec<FormattedBlock>
Expand description

Format a file into a list of FormattedBlocks to be applied by an IDE for autoformatting.

This function expects a complete file, not just a block of code. To format individual rsx! blocks, use fmt_block instead.

The point here is to provide precise modifications of a source file so an accompanying IDE tool can map these changes back to the file precisely.

Nested blocks of RSX will be handled automatically