Struct tuirealm::props::builder::GenericPropsBuilder[][src]

pub struct GenericPropsBuilder { /* fields omitted */ }

GenericPropsBuilder

This props builder exports methods to set values for all the possible properties. In a normal case you shouldn’t use this builder, unless you can actually customize everything of your component. For a Builder you should always implement only three traits: Default, From<Props> and PropsBuilder, then you should implement the setter methods for it, for the only properties you need for the associated component.

Implementations

impl GenericPropsBuilder[src]

pub fn with_foreground(&mut self, color: Color) -> &mut Self[src]

with_foreground

Set foreground color for component

pub fn with_background(&mut self, color: Color) -> &mut Self[src]

with_background

Set background color for component

pub fn with_borders(
    &mut self,
    borders: Borders,
    variant: BorderType,
    color: Color
) -> &mut Self
[src]

with_borders

Set component borders style

pub fn bold(&mut self) -> &mut Self[src]

bold

Set bold property for component

pub fn italic(&mut self) -> &mut Self[src]

italic

Set italic property for component

pub fn underlined(&mut self) -> &mut Self[src]

underlined

Set underlined property for component

Set slow_blink property for component

Set rapid_blink property for component

pub fn reversed(&mut self) -> &mut Self[src]

reversed

Set reversed property for component

pub fn strikethrough(&mut self) -> &mut Self[src]

strikethrough

Set strikethrough property for component

pub fn with_texts(&mut self, texts: TextParts) -> &mut Self[src]

with_texts

Set texts for component

pub fn with_input(&mut self, input_type: InputType) -> &mut Self[src]

with_input

Set input type for component

pub fn with_input_len(&mut self, len: usize) -> &mut Self[src]

with_input_len

Set max input len

pub fn with_custom_color(
    &mut self,
    name: &'static str,
    color: Color
) -> &mut Self
[src]

with_custom_color

Set a custom color inside the color palette

pub fn with_value(&mut self, value: PropValue) -> &mut Self[src]

with_value

Set initial value for component

Trait Implementations

impl Default for GenericPropsBuilder[src]

impl From<Props> for GenericPropsBuilder[src]

impl PropsBuilder for GenericPropsBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.