Trait HasStr

Source
pub trait HasStr {
    // Required method
    fn get_str(&self) -> &str;

    // Provided method
    fn get_string(&self) -> String { ... }
}
Expand description

Read an unformatted &str

For write-support, see HasString. Alternatively, for e.g. Label<&'static str>, the set_text method which may be used, but in practice this is rarely sufficient.

Required Methods§

Source

fn get_str(&self) -> &str

Get text by reference

Provided Methods§

Source

fn get_string(&self) -> String

Get text as a String

Implementors§