#[non_exhaustive]pub struct PrintOptions {
pub max_nodes: usize,
pub max_chars: usize,
pub lets: bool,
pub symbol_widths: bool,
pub max_depth: u32,
}Expand description
Options for Context::display_with.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_nodes: usizeStop after emitting this many nodes.
max_chars: usizeStop after about this many characters.
lets: boolBind shared subterms with let (otherwise they are repeated, within the budgets).
symbol_widths: boolAnnotate every symbol’s first occurrence with its width (x:64), so the text parses
into a context that does not know the symbols.
max_depth: u32The deepest inline nesting before a subterm is bound with let.
Implementations§
Source§impl PrintOptions
impl PrintOptions
Sourcepub fn with_max_nodes(self, n: usize) -> Self
pub fn with_max_nodes(self, n: usize) -> Self
Sets max_nodes.
Sourcepub fn with_max_chars(self, n: usize) -> Self
pub fn with_max_chars(self, n: usize) -> Self
Sets max_chars.
Sourcepub fn with_symbol_widths(self, yes: bool) -> Self
pub fn with_symbol_widths(self, yes: bool) -> Self
Sets symbol_widths.
Trait Implementations§
Source§impl Clone for PrintOptions
impl Clone for PrintOptions
Source§impl Debug for PrintOptions
impl Debug for PrintOptions
Auto Trait Implementations§
impl Freeze for PrintOptions
impl RefUnwindSafe for PrintOptions
impl Send for PrintOptions
impl Sync for PrintOptions
impl Unpin for PrintOptions
impl UnsafeUnpin for PrintOptions
impl UnwindSafe for PrintOptions
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