pub struct DisplaySettings { /* private fields */ }Expand description
Custom module display settings.
Implementations§
Source§impl DisplaySettings
impl DisplaySettings
Sourcepub fn with_show_param_id(self, flag: bool) -> Self
pub fn with_show_param_id(self, flag: bool) -> Self
Sourcepub fn with_show_all_attributes(self, flag: bool) -> Self
pub fn with_show_all_attributes(self, flag: bool) -> Self
Sourcepub fn with_show_num_parameters(self, flag: bool) -> Self
pub fn with_show_num_parameters(self, flag: bool) -> Self
Sourcepub fn with_new_line_after_attribute(self, flag: bool) -> Self
pub fn with_new_line_after_attribute(self, flag: bool) -> Self
Sourcepub fn with_indentation_size(self, size: usize) -> Self
pub fn with_indentation_size(self, size: usize) -> Self
Sourcepub fn optional(self) -> Option<Self>
pub fn optional(self) -> Option<Self>
A convenience method to wrap the DisplaySettings struct in an option.
§Returns
An optional DisplaySettings.
Sourcepub fn level_up(self) -> Self
pub fn level_up(self) -> Self
Increases the level of indentation.
§Returns
Updated DisplaySettings instance with increased indentation level.
Sourcepub fn show_param_id(&self) -> bool
pub fn show_param_id(&self) -> bool
Gets show_param_id flag, substitutes false if not set.
This flag is used to print the module parameter ids.
§Returns
A boolean value indicating whether to show parameter ids.
Sourcepub fn show_all_attributes(&self) -> bool
pub fn show_all_attributes(&self) -> bool
Gets show_all_attributes, substitutes false if not set.
This flag is used to force to print all module attributes, overriding custom attributes.
§Returns
A boolean value indicating whether to show all attributes.
Sourcepub fn show_num_parameters(&self) -> bool
pub fn show_num_parameters(&self) -> bool
Gets show_num_parameters, substitutes true if not set.
This flag is used to print the number of module parameters.
§Returns
A boolean value indicating whether to show the number of parameters.
Sourcepub fn new_line_after_attribute(&self) -> bool
pub fn new_line_after_attribute(&self) -> bool
Gets new_line_after_attribute, substitutes true if not set.
This flag is used to print a new line after an attribute.
§Returns
A boolean value indicating whether to print a new line after an attribute.
Sourcepub fn indentation_size(&self) -> usize
pub fn indentation_size(&self) -> usize
Gets indentation_size, substitutes 2 if not set.
This flag is used to set the size of indentation.
§Returns
An integer value indicating the size of indentation.