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

pub struct GenericPropsBuilder { /* fields omitted */ }
Expand description

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: PropPayload) -> &mut Self[src]

with_value

Set initial value for component

Trait Implementations

impl Default for GenericPropsBuilder[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

impl From<Props> for GenericPropsBuilder[src]

fn from(props: Props) -> Self[src]

Performs the conversion.

impl PropsBuilder for GenericPropsBuilder[src]

fn build(&mut self) -> Props[src]

build Read more

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

hidden Read more

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

visible Read more

Auto Trait Implementations

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.