pub struct RenderSettings { /* private fields */ }Expand description
The output features selected for one render operation.
The default is deliberately dumb: no escape-sequence-producing feature is
selected. A terminal’s detected maximum can be adopted with From and then
narrowed with the named setters.
Implementations§
Source§impl RenderSettings
impl RenderSettings
Sourcepub const fn all() -> Self
pub const fn all() -> Self
Selects every rendering feature without degrading logical styles.
This is intended for serializers whose styles have already been
narrowed to the output’s capabilities. Ordinary terminal output should
detect capabilities and convert them with From.
pub const fn get_color_level(self) -> ColorLevel
pub const fn get_attributes(self) -> TextAttributes
pub const fn get_underline_styles(self) -> UnderlineStyleSet
pub const fn get_underline_colors(self) -> bool
pub const fn get_hyperlinks(self) -> bool
pub const fn color_level(self, color_level: ColorLevel) -> Self
pub const fn attributes(self, attributes: TextAttributes) -> Self
pub const fn underline_styles(self, styles: UnderlineStyleSet) -> Self
pub const fn underline_colors(self, enabled: bool) -> Self
pub const fn hyperlinks(self, enabled: bool) -> Self
pub const fn reset_color_level(self) -> Self
pub const fn reset_attributes(self) -> Self
pub const fn reset_underline_styles(self) -> Self
pub const fn reset_underline_colors(self) -> Self
pub const fn reset_hyperlinks(self) -> Self
Sourcepub fn resolve_text_style(self, style: &TextStyle) -> TextStyle
pub fn resolve_text_style(self, style: &TextStyle) -> TextStyle
Applies these selected features to one logical text style.
This is useful to output backends that serialize runs themselves, such
as an interactive prompt renderer. Ordinary static output should call
render for the whole resolved view.
Trait Implementations§
Source§impl Clone for RenderSettings
impl Clone for RenderSettings
Source§fn clone(&self) -> RenderSettings
fn clone(&self) -> RenderSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderSettings
impl Debug for RenderSettings
Source§impl Default for RenderSettings
impl Default for RenderSettings
Source§fn default() -> RenderSettings
fn default() -> RenderSettings
Returns the “default value” for a type. Read more
Source§impl From<TerminalCapabilities> for RenderSettings
impl From<TerminalCapabilities> for RenderSettings
Source§fn from(capabilities: TerminalCapabilities) -> Self
fn from(capabilities: TerminalCapabilities) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RenderSettings
impl PartialEq for RenderSettings
Source§fn eq(&self, other: &RenderSettings) -> bool
fn eq(&self, other: &RenderSettings) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for RenderSettings
impl Eq for RenderSettings
impl StructuralPartialEq for RenderSettings
Auto Trait Implementations§
impl Freeze for RenderSettings
impl RefUnwindSafe for RenderSettings
impl Send for RenderSettings
impl Sync for RenderSettings
impl Unpin for RenderSettings
impl UnsafeUnpin for RenderSettings
impl UnwindSafe for RenderSettings
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