Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§