Trait cushy::widgets::input::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.

Object Safety§

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§