zng::config::settings::editor

Trait SettingsCtxExt

source
pub trait SettingsCtxExt {
    // Required methods
    fn editor_search(&self) -> ContextVar<Txt>;
    fn editor_selected_category(&self) -> ContextVar<CategoryId>;
    fn editor_state(
        &self,
    ) -> ReadOnlyVar<Option<SettingsEditorState>, ContextVar<Option<SettingsEditorState>>>;
    fn editor_setting(
        &self,
    ) -> ReadOnlyVar<Option<Setting>, ContextVar<Option<Setting>>>;
}
Expand description

Extends SETTINGS to provide contextual information in an editor.

Required Methods§

Gets a read-write context var that tracks the search text.

source

fn editor_selected_category(&self) -> ContextVar<CategoryId>

Gets a read-write context var that tracks the selected category.

source

fn editor_state( &self, ) -> ReadOnlyVar<Option<SettingsEditorState>, ContextVar<Option<SettingsEditorState>>>

Gets a read-only context var that tracks the current editor data state.

source

fn editor_setting( &self, ) -> ReadOnlyVar<Option<Setting>, ContextVar<Option<Setting>>>

Gets a read-only context var that tracks the Setting entry the widget is inside, or will be.

Implementors§