pub struct AttributesAdder<'a> { /* private fields */ }
Expand description
Adds Attributes to the text.
See also: RichTextBuilder
Implementations§
§impl AttributesAdder<'_>
impl AttributesAdder<'_>
pub fn add_attr(&mut self, attr: Attribute) -> &mut AttributesAdder<'_>
pub fn add_attr(&mut self, attr: Attribute) -> &mut AttributesAdder<'_>
Add the given attribute.
pub fn size(
&mut self,
size: impl Into<KeyOrValue<f64>>
) -> &mut AttributesAdder<'_>
pub fn size( &mut self, size: impl Into<KeyOrValue<f64>> ) -> &mut AttributesAdder<'_>
Add a font size attribute.
pub fn text_color(
&mut self,
color: impl Into<KeyOrValue<Color>>
) -> &mut AttributesAdder<'_>
pub fn text_color( &mut self, color: impl Into<KeyOrValue<Color>> ) -> &mut AttributesAdder<'_>
Add a foreground color attribute.
pub fn font_family(&mut self, family: FontFamily) -> &mut AttributesAdder<'_>
pub fn font_family(&mut self, family: FontFamily) -> &mut AttributesAdder<'_>
Add a font family attribute.
pub fn weight(&mut self, weight: FontWeight) -> &mut AttributesAdder<'_>
pub fn weight(&mut self, weight: FontWeight) -> &mut AttributesAdder<'_>
Add a FontWeight
attribute.
pub fn style(&mut self, style: FontStyle) -> &mut AttributesAdder<'_>
pub fn style(&mut self, style: FontStyle) -> &mut AttributesAdder<'_>
Add a FontStyle
attribute.
pub fn underline(&mut self, underline: bool) -> &mut AttributesAdder<'_>
pub fn underline(&mut self, underline: bool) -> &mut AttributesAdder<'_>
Add a underline attribute.
pub fn strikethrough(&mut self, strikethrough: bool) -> &mut AttributesAdder<'_>
pub fn strikethrough(&mut self, strikethrough: bool) -> &mut AttributesAdder<'_>
Add a strikethrough attribute.
pub fn font_descriptor(
&mut self,
font: impl Into<KeyOrValue<FontDescriptor>>
) -> &mut AttributesAdder<'_>
pub fn font_descriptor( &mut self, font: impl Into<KeyOrValue<FontDescriptor>> ) -> &mut AttributesAdder<'_>
Add a FontDescriptor
attribute.
pub fn link(&mut self, command: impl Into<Command>) -> &mut AttributesAdder<'_>
pub fn link(&mut self, command: impl Into<Command>) -> &mut AttributesAdder<'_>
Add a Link
attribute.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AttributesAdder<'a>
impl<'a> !Send for AttributesAdder<'a>
impl<'a> !Sync for AttributesAdder<'a>
impl<'a> Unpin for AttributesAdder<'a>
impl<'a> !UnwindSafe for AttributesAdder<'a>
Blanket Implementations§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.