Struct burn::module::DisplaySettings
pub struct DisplaySettings { /* private fields */ }
Expand description
Custom module display settings.
Implementations§
§impl DisplaySettings
impl DisplaySettings
pub fn new() -> DisplaySettings
pub fn new() -> DisplaySettings
pub fn with_show_param_id(self, flag: bool) -> DisplaySettings
pub fn with_show_param_id(self, flag: bool) -> DisplaySettings
pub fn with_show_all_attributes(self, flag: bool) -> DisplaySettings
pub fn with_show_all_attributes(self, flag: bool) -> DisplaySettings
pub fn with_show_num_parameters(self, flag: bool) -> DisplaySettings
pub fn with_show_num_parameters(self, flag: bool) -> DisplaySettings
pub fn with_new_line_after_attribute(self, flag: bool) -> DisplaySettings
pub fn with_new_line_after_attribute(self, flag: bool) -> DisplaySettings
pub fn with_indentation_size(self, size: usize) -> DisplaySettings
pub fn with_indentation_size(self, size: usize) -> DisplaySettings
pub fn inherit(self, top: DisplaySettings) -> DisplaySettings
pub fn inherit(self, top: DisplaySettings) -> DisplaySettings
pub fn optional(self) -> Option<DisplaySettings>
pub fn optional(self) -> Option<DisplaySettings>
A convenience method to wrap the DisplaySettings struct in an option.
§Returns
An optional DisplaySettings
.
pub fn level_up(self) -> DisplaySettings
pub fn level_up(self) -> DisplaySettings
Increases the level of indentation.
§Returns
Updated DisplaySettings
instance with increased indentation level.
pub 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.
pub 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.
pub 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.
pub 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.
pub 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.
Trait Implementations§
§impl Clone for DisplaySettings
impl Clone for DisplaySettings
§fn clone(&self) -> DisplaySettings
fn clone(&self) -> DisplaySettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for DisplaySettings
impl Debug for DisplaySettings
§impl Default for DisplaySettings
impl Default for DisplaySettings
§fn default() -> DisplaySettings
fn default() -> DisplaySettings
Auto Trait Implementations§
impl Freeze for DisplaySettings
impl RefUnwindSafe for DisplaySettings
impl Send for DisplaySettings
impl Sync for DisplaySettings
impl Unpin for DisplaySettings
impl UnwindSafe for DisplaySettings
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.