Struct air_beautifier::Beautifier
source · pub struct Beautifier<W: Write> { /* private fields */ }
Expand description
AIR beautifier.
Implementations§
source§impl<W: Write> Beautifier<W>
impl<W: Write> Beautifier<W>
sourcepub fn new_with_indent(output: W, indent_step: usize) -> Self
pub fn new_with_indent(output: W, indent_step: usize) -> Self
Beautifier for the output with custom indentation step.
sourcepub fn enable_all_patterns(self) -> Self
pub fn enable_all_patterns(self) -> Self
Enable all patterns in the emited code.
pub fn enable_try_hopon(self) -> Self
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Unwrap the Beautifier into the underlying writer.
sourcepub fn beautify(&mut self, air_script: &str) -> Result<(), BeautifyError>
pub fn beautify(&mut self, air_script: &str) -> Result<(), BeautifyError>
Emit beautified code for the air_script
.
sourcepub fn beautify_ast(
&mut self,
ast: &Instruction<'_>,
) -> Result<(), BeautifyError>
pub fn beautify_ast( &mut self, ast: &Instruction<'_>, ) -> Result<(), BeautifyError>
Emit beautified code for the ast
.
Auto Trait Implementations§
impl<W> Freeze for Beautifier<W>where
W: Freeze,
impl<W> RefUnwindSafe for Beautifier<W>where
W: RefUnwindSafe,
impl<W> Send for Beautifier<W>where
W: Send,
impl<W> Sync for Beautifier<W>where
W: Sync,
impl<W> Unpin for Beautifier<W>where
W: Unpin,
impl<W> UnwindSafe for Beautifier<W>where
W: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more