InputBuilderExt

Trait InputBuilderExt 

Source
pub trait InputBuilderExt {
    // Required methods
    fn with_value(self, val: &str) -> Self;
    fn with_maximum_size(self, val: i32) -> Self;
    fn with_text_font(self, font: Font) -> Self;
    fn with_text_color(self, color: Color) -> Self;
    fn with_text_size(self, sz: i32) -> Self;
    fn as_readonly(self, val: bool) -> Self;
    fn as_wrap(self, val: bool) -> Self;
}
Expand description

Adds builder pattern friendly versions of several setter functions for Input widgets

Required Methods§

Source

fn with_value(self, val: &str) -> Self

Sets the value inside an input/output widget

Source

fn with_maximum_size(self, val: i32) -> Self

Sets the maximum size (in bytes) accepted by an input/output widget

Source

fn with_text_font(self, font: Font) -> Self

Sets the text font

Source

fn with_text_color(self, color: Color) -> Self

Sets the text color

Source

fn with_text_size(self, sz: i32) -> Self

Sets the text size

Source

fn as_readonly(self, val: bool) -> Self

Set readonly status of the input/output widget

Source

fn as_wrap(self, val: bool) -> Self

Set whether text is wrapped inside an input/output widget

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I> InputBuilderExt for I
where I: InputExt,