Skip to main content

View

Trait View 

Source
pub trait View: 'static {
    // Provided method
    fn id(self, id: impl Hash) -> AnyView
       where Self: Sized { ... }
}
Expand description

Something that can be shown: every view Ferrokit makes (text, button, table, the stacks…) and anything built from them. Built once: its native views and effects are made the first time it’s shown and updated in place after.

Make your own views by composing these (a function returning impl View) or by wrapping a native view with native; implementing View directly isn’t supported, so its internals can change.

Provided Methods§

Source

fn id(self, id: impl Hash) -> AnyView
where Self: Sized,

Gives the view an identity: a dynamic region keeps the existing node instead of rebuilding when the new view has the same id.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl View for AnyView

Source§

impl View for Button

Source§

impl View for Canvas

Source§

impl View for Chart

Source§

impl View for Checkbox

Source§

impl View for ColorWell

Source§

impl View for ComboBox

Source§

impl View for DatePicker

Source§

impl View for Divider

Source§

impl View for Dynamic

Source§

impl View for FilterEditor

Source§

impl View for ForEach

Source§

impl View for Form

Source§

impl View for Gauge

Source§

impl View for Grid

Source§

impl View for HelpButton

Source§

impl View for Image

Source§

impl View for Layers

Source§

impl View for MenuButton

Source§

impl View for PathControl

Source§

impl View for PdfView

Source§

impl View for Progress

Source§

impl View for Scroll

Source§

impl View for SearchField

Source§

impl View for ShareButton

Source§

impl View for Slider

Source§

impl View for Spacer

Source§

impl View for Split

Source§

impl View for Stack

Source§

impl View for Stepper

Source§

impl View for Text

Source§

impl View for TextEditor

Source§

impl View for TextField

Source§

impl View for Thumbnail

Source§

impl View for TimePicker

Source§

impl View for TokenField

Source§

impl View for VideoPlayer

Source§

impl View for Watch

Source§

impl View for WebView

Source§

impl<T: 'static> View for Table<T>

Source§

impl<T: Identifiable + 'static> View for ColumnBrowser<T>

Source§

impl<T: Identifiable + 'static> View for Outline<T>

Source§

impl<T: Identifiable + Clone + 'static> View for Collection<T>

Source§

impl<T: PartialEq + Clone + 'static> View for Picker<T>

Source§

impl<T: PartialEq + Clone + 'static> View for RadioGroup<T>

Source§

impl<T: PartialEq + Clone + 'static> View for Segmented<T>

Source§

impl<T: PartialEq + Clone + 'static> View for Tabs<T>

Source§

impl<V: Message + AsRef<NSView> + 'static> View for NativeView<V>

Source§

impl<V: View> View for Modified<V>