cushy::widgets::input

Trait InputStorage

Source
pub trait InputStorage: Send + 'static {
    const MASKED: bool;

    // Required methods
    fn as_str(&self) -> &str;
    fn as_string_mut(&mut self) -> &mut String;
}
Expand description

A type that can be used as the storage of an Input’s string value.

This crate implements this trait for these types:

Required Associated Constants§

Source

const MASKED: bool

If true, the input field should display a mask instead of the actual string by default.

Required Methods§

Source

fn as_str(&self) -> &str

Returns a reference to the contents as a str.

Source

fn as_string_mut(&mut self) -> &mut String

Returns an exclusive reference to the contents as a String.

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.

Implementations on Foreign Types§

Source§

impl InputStorage for Cow<'static, str>

Source§

const MASKED: bool = false

Source§

fn as_str(&self) -> &str

Source§

fn as_string_mut(&mut self) -> &mut String

Source§

impl InputStorage for String

Source§

const MASKED: bool = false

Source§

fn as_str(&self) -> &str

Source§

fn as_string_mut(&mut self) -> &mut String

Implementors§