pub struct ErrorMessageRenderConfig {
pub prefix: Styled<&'static str>,
pub separator: StyleSheet,
pub message: StyleSheet,
}
Expand description
Render configuration for error messages.
Fields
prefix: Styled<&'static str>
Prefix style.
separator: StyleSheet
Separator style.
Note: This separator is a space character. It might be useful to style it if you want to set a background color for error messages.
message: StyleSheet
Message style.
Implementations
sourceimpl ErrorMessageRenderConfig
impl ErrorMessageRenderConfig
sourcepub fn empty() -> ErrorMessageRenderConfig
pub fn empty() -> ErrorMessageRenderConfig
Render configuration in which no colors or attributes are applied.
sourcepub fn default_colored() -> ErrorMessageRenderConfig
pub fn default_colored() -> ErrorMessageRenderConfig
Render configuration where default colors and attributes are applied.
sourcepub fn with_prefix(
self,
prefix: Styled<&'static str>
) -> ErrorMessageRenderConfig
pub fn with_prefix(
self,
prefix: Styled<&'static str>
) -> ErrorMessageRenderConfig
Sets the prefix.
sourcepub fn with_separator(self, separator: StyleSheet) -> ErrorMessageRenderConfig
pub fn with_separator(self, separator: StyleSheet) -> ErrorMessageRenderConfig
Sets the separator stylesheet.
Note: This separator is a space character. It might be useful to style it if you want to set a background color for error messages.
sourcepub fn with_message(self, message: StyleSheet) -> ErrorMessageRenderConfig
pub fn with_message(self, message: StyleSheet) -> ErrorMessageRenderConfig
Sets the message stylesheet.
Trait Implementations
sourceimpl Clone for ErrorMessageRenderConfig
impl Clone for ErrorMessageRenderConfig
sourcefn clone(&self) -> ErrorMessageRenderConfig
fn clone(&self) -> ErrorMessageRenderConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ErrorMessageRenderConfig
impl Debug for ErrorMessageRenderConfig
impl Copy for ErrorMessageRenderConfig
Auto Trait Implementations
impl RefUnwindSafe for ErrorMessageRenderConfig
impl Send for ErrorMessageRenderConfig
impl Sync for ErrorMessageRenderConfig
impl Unpin for ErrorMessageRenderConfig
impl UnwindSafe for ErrorMessageRenderConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more