Skip to main content

IntoProp

Trait IntoProp 

Source
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§

Source

fn into_prop(self) -> Prop<T>

Wraps the value or closure.

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<(u32, u32)> for (u32, u32)

Source§

fn into_prop(self) -> Prop<(u32, u32)>

Source§

impl IntoProp<IconSource> for &Path

An SVG or PNG file.

Source§

impl IntoProp<IconSource> for &str

An icon name, such as "audio-volume-high".

Source§

impl IntoProp<IconSource> for PathBuf

An SVG or PNG file.

Source§

impl IntoProp<IconSource> for String

An icon name, as tray items send them.

Source§

impl IntoProp<Option<Region>> for Option<Region>

Source§

impl IntoProp<Option<usize>> for Option<usize>

Source§

impl IntoProp<PathBuf> for &Path

Source§

impl IntoProp<PathBuf> for &str

Source§

impl IntoProp<PathBuf> for PathBuf

Source§

impl IntoProp<PathBuf> for String

Source§

impl IntoProp<String> for &str

Source§

impl IntoProp<String> for String

Source§

impl IntoProp<Vec<MenuEntry>> for Vec<MenuEntry>

Source§

impl IntoProp<bool> for bool

Source§

impl IntoProp<f32> for f32

Source§

impl IntoProp<i32> for i32

Source§

impl IntoProp<u32> for u32

Implementors§