pub trait IntoProp<T> {
// Required method
fn into_prop(self) -> Prop<T>;
}Expand description
Anything a widget property accepts: a value of type T, or a closure
that returns one.
Plain values work for the property types this crate uses, and a string
slice works where a String is expected. Any FnMut() -> T closure
works too: it runs in an effect, so it reruns when a signal it read
changes.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl IntoProp<IconSource> for &Path
An SVG or PNG file.
impl IntoProp<IconSource> for &Path
An SVG or PNG file.
fn into_prop(self) -> Prop<IconSource>
Source§impl IntoProp<IconSource> for &str
An icon name, such as "audio-volume-high".
impl IntoProp<IconSource> for &str
An icon name, such as "audio-volume-high".
fn into_prop(self) -> Prop<IconSource>
Source§impl IntoProp<IconSource> for PathBuf
An SVG or PNG file.
impl IntoProp<IconSource> for PathBuf
An SVG or PNG file.
fn into_prop(self) -> Prop<IconSource>
Source§impl IntoProp<IconSource> for String
An icon name, as tray items send them.
impl IntoProp<IconSource> for String
An icon name, as tray items send them.