ConfigurableView

Trait ConfigurableView 

Source
pub trait ConfigurableView: View {
    type Config: ViewConfiguration;

    // Required method
    fn config(self) -> Self::Config;
}
Expand description

A trait for views that can be configured with additional parameters.

This trait extends the basic View trait to support views that can be customized with a configuration object, allowing for more flexible and reusable UI components.

Required Associated Types§

Source

type Config: ViewConfiguration

The configuration type associated with this view.

This type defines the structure of configuration data that can be applied to the view.

Required Methods§

Source

fn config(self) -> Self::Config

Returns the configuration for this view.

This method extracts the configuration data from the view, which can then be modified and applied to create customized versions of the view.

§Returns

The configuration object for this view.

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§