Trait relm4::RelmObjectExt

source ·
pub trait RelmObjectExt {
    // Required methods
    fn on_destroy<F: FnOnce() + 'static>(&self, func: F);
    fn add_binding<B: Binding>(&self, binding: &B, property_name: &str);
    fn add_write_only_binding<B: Binding>(
        &self,
        binding: &B,
        property_name: &str
    );
}
Expand description

Trait that extends gtk::prelude::ObjectExt.

Required Methods§

source

fn on_destroy<F: FnOnce() + 'static>(&self, func: F)

Runs the given function when the object is destroyed.

source

fn add_binding<B: Binding>(&self, binding: &B, property_name: &str)

Bind a data binding to a property of an object.

This is similar to gtk::prelude::ObjectExt::bind_property and always bidirectional.

source

fn add_write_only_binding<B: Binding>(&self, binding: &B, property_name: &str)

Bind a data binding to a property of an object with uni-directional access, so values can only be written but are not synced in the other direction.

Object Safety§

This trait is not object safe.

Implementors§