pub struct TermDisplay<'a> { /* private fields */ }Expand description
A wrapper that ties together a Term and its Arena, forming the
basis for configurable pretty-printing. This type is designed as the
foundation on which flexible formatting and printing of terms will be built.
It already implements fmt::Display, so you can seamlessly use it with
standard formatting macros (format!, println!, etc.) to render
terms. In the future, it will also support additional, customizable
formatting options for advanced pretty-printing.
§Example
use arena_terms::{Term, Arena, func, IntoTerm};
let mut arena = Arena::new();
let term = func!("foo"; 1, "hello, world!" => &mut arena);
println!("{}", term.display(&arena));Construct instances via Term::display or [Arena::display].
Trait Implementations§
Source§impl<'a> Display for TermDisplay<'a>
Implements fmt::Display for TermDisplay, enabling it to be
formatted and printed with standard formatting macros.
impl<'a> Display for TermDisplay<'a>
Implements fmt::Display for TermDisplay, enabling it to be
formatted and printed with standard formatting macros.
Auto Trait Implementations§
impl<'a> Freeze for TermDisplay<'a>
impl<'a> RefUnwindSafe for TermDisplay<'a>
impl<'a> Send for TermDisplay<'a>
impl<'a> Sync for TermDisplay<'a>
impl<'a> Unpin for TermDisplay<'a>
impl<'a> UnwindSafe for TermDisplay<'a>
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