#[non_exhaustive]pub struct ScriptSnippetConfig {
pub show_outer_frame: bool,
pub show_line_numbers: bool,
pub show_module_path: bool,
pub highlight_code: bool,
pub unicode_drawing: bool,
}Expand description
A configuration of options for drawing the ScriptSnippet object.
The Default implementation of this object provides canonical configuration options.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.show_outer_frame: boolWhether the boxed frame should surround the code content from all sides.
The default value is true.
show_line_numbers: boolWhether line numbers should be shown on the left of the code content.
The default value is true.
show_module_path: boolWhether the full canonical script module path should be shown in the caption of the printed snippet.
If set to true, the snippet caption will look like:
‹package name›.‹module name› [<custom caption>].
Otherwise, the printer will only use the custom caption if specified.
The default value is true.
highlight_code: boolIf set to true, syntax highlighting will be applied to the source code. Otherwise, the source code will be monochrome.
The default value is true.
unicode_drawing: boolWhether the snippet printer should use Unicode box drawing characters for decorative elements. Otherwise, the printer uses only ASCII box-drawing characters.
The default value is true.
Implementations§
Trait Implementations§
Source§impl Clone for ScriptSnippetConfig
impl Clone for ScriptSnippetConfig
Source§fn clone(&self) -> ScriptSnippetConfig
fn clone(&self) -> ScriptSnippetConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more