pub struct PrettyConfig {
pub max_width: usize,
pub indent_size: usize,
pub show_implicit: bool,
pub show_universes: bool,
pub use_unicode: bool,
pub use_notation: bool,
pub parens_mode: ParensMode,
}Expand description
Configuration for the pretty printer.
Fields§
§max_width: usizeMaximum line width before breaking (default 100).
indent_size: usizeNumber of spaces per indentation level (default 2).
show_implicit: boolWhether to show implicit arguments.
show_universes: boolWhether to show universe annotations.
use_unicode: boolWhether to use unicode symbols (e.g. -> vs \u{2192}).
use_notation: boolWhether to try to use registered notations for App nodes.
parens_mode: ParensModeParenthesization mode.
Implementations§
Source§impl PrettyConfig
impl PrettyConfig
Sourcepub fn with_max_width(self, width: usize) -> Self
pub fn with_max_width(self, width: usize) -> Self
Set the maximum line width.
Sourcepub fn with_indent_size(self, size: usize) -> Self
pub fn with_indent_size(self, size: usize) -> Self
Set the indent size.
Sourcepub fn with_show_implicit(self, show: bool) -> Self
pub fn with_show_implicit(self, show: bool) -> Self
Enable or disable showing implicit arguments.
Sourcepub fn with_show_universes(self, show: bool) -> Self
pub fn with_show_universes(self, show: bool) -> Self
Enable or disable showing universe annotations.
Sourcepub fn with_unicode(self, unicode: bool) -> Self
pub fn with_unicode(self, unicode: bool) -> Self
Enable or disable unicode symbols.
Sourcepub fn with_notation(self, notation: bool) -> Self
pub fn with_notation(self, notation: bool) -> Self
Enable or disable notation-aware printing.
Sourcepub fn with_parens_mode(self, mode: ParensMode) -> Self
pub fn with_parens_mode(self, mode: ParensMode) -> Self
Set the parenthesization mode.
Trait Implementations§
Source§impl Clone for PrettyConfig
impl Clone for PrettyConfig
Source§fn clone(&self) -> PrettyConfig
fn clone(&self) -> PrettyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrettyConfig
impl Debug for PrettyConfig
Auto Trait Implementations§
impl Freeze for PrettyConfig
impl RefUnwindSafe for PrettyConfig
impl Send for PrettyConfig
impl Sync for PrettyConfig
impl Unpin for PrettyConfig
impl UnsafeUnpin for PrettyConfig
impl UnwindSafe for PrettyConfig
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