pub struct SettingsState {Show 30 fields
pub pages: Vec<SettingsPage>,
pub selected_category: usize,
pub selected_item: usize,
pub focus: FocusManager<FocusPanel>,
pub footer_button_index: usize,
pub pending_changes: HashMap<String, Value>,
pub visible: bool,
pub search_query: String,
pub search_active: bool,
pub search_results: Vec<SearchResult>,
pub selected_search_result: usize,
pub search_scroll_offset: usize,
pub search_max_visible: usize,
pub showing_confirm_dialog: bool,
pub confirm_dialog_selection: usize,
pub confirm_dialog_hover: Option<usize>,
pub showing_reset_dialog: bool,
pub reset_dialog_selection: usize,
pub reset_dialog_hover: Option<usize>,
pub showing_help: bool,
pub scroll_panel: ScrollablePanel,
pub sub_focus: Option<usize>,
pub editing_text: bool,
pub hover_position: Option<(u16, u16)>,
pub hover_hit: Option<SettingsHit>,
pub entry_dialog_stack: Vec<EntryDialogState>,
pub target_layer: ConfigLayer,
pub layer_sources: HashMap<String, ConfigLayer>,
pub pending_deletions: HashSet<String>,
pub layout_width: u16,
/* private fields */
}Expand description
The state of the settings UI
Fields§
§pages: Vec<SettingsPage>Pages built from categories
selected_category: usizeCurrently selected category index
selected_item: usizeCurrently selected item index within the category
focus: FocusManager<FocusPanel>Which panel currently has keyboard focus
Selected footer button index (0=Reset, 1=Save, 2=Cancel)
pending_changes: HashMap<String, Value>Pending changes (path -> new value)
visible: boolWhether the settings panel is visible
search_query: StringCurrent search query
search_active: boolWhether search is active
search_results: Vec<SearchResult>Current search results
selected_search_result: usizeSelected search result index
search_scroll_offset: usizeScroll offset for search results (first visible result index)
search_max_visible: usizeMaximum number of visible search results (set during render)
showing_confirm_dialog: boolWhether the unsaved changes confirmation dialog is showing
confirm_dialog_selection: usizeSelected option in confirmation dialog (0=Save, 1=Discard, 2=Cancel)
confirm_dialog_hover: Option<usize>Hovered option in confirmation dialog (for mouse hover feedback)
showing_reset_dialog: boolWhether the reset confirmation dialog is showing
reset_dialog_selection: usizeSelected option in reset dialog (0=Reset, 1=Cancel)
reset_dialog_hover: Option<usize>Hovered option in reset dialog (for mouse hover feedback)
showing_help: boolWhether the help overlay is showing
scroll_panel: ScrollablePanelScrollable panel for settings items
sub_focus: Option<usize>Sub-focus index within the selected item (for TextList/Map navigation)
editing_text: boolWhether we’re in text editing mode (for TextList controls)
hover_position: Option<(u16, u16)>Current mouse hover position (for hover feedback)
hover_hit: Option<SettingsHit>Current hover hit result (computed from hover_position and cached layout)
entry_dialog_stack: Vec<EntryDialogState>Stack of entry dialogs (for nested editing of Maps/ObjectArrays) The top of the stack (last element) is the currently active dialog.
target_layer: ConfigLayerWhich configuration layer to save changes to. User layer is the default (global settings). Project layer saves to the current project’s .fresh/config.json.
layer_sources: HashMap<String, ConfigLayer>Source layer for each setting path (where the value came from). Maps JSON pointer paths (e.g., “/editor/tab_size”) to their source layer. Values not in this map come from system defaults.
pending_deletions: HashSet<String>Paths to be removed from the current layer on save. When a user “resets” a setting, we remove it from the delta rather than setting it to the schema default.
layout_width: u16Last known layout width for description wrapping. Set during render and propagated to items for height calculations.
Implementations§
Source§impl SettingsState
impl SettingsState
Sourcepub fn new(schema_json: &str, config: &Config) -> Result<Self, Error>
pub fn new(schema_json: &str, config: &Config) -> Result<Self, Error>
Create a new settings state from schema and current config
Sourcepub fn focus_panel(&self) -> FocusPanel
pub fn focus_panel(&self) -> FocusPanel
Get the currently focused panel
Sourcepub fn entry_dialog(&self) -> Option<&EntryDialogState>
pub fn entry_dialog(&self) -> Option<&EntryDialogState>
Get the current entry dialog (top of stack), if any
Sourcepub fn entry_dialog_mut(&mut self) -> Option<&mut EntryDialogState>
pub fn entry_dialog_mut(&mut self) -> Option<&mut EntryDialogState>
Get the current entry dialog mutably (top of stack), if any
Sourcepub fn has_entry_dialog(&self) -> bool
pub fn has_entry_dialog(&self) -> bool
Check if any entry dialog is open
Sourcepub fn current_page(&self) -> Option<&SettingsPage>
pub fn current_page(&self) -> Option<&SettingsPage>
Get the currently selected page
Sourcepub fn current_page_mut(&mut self) -> Option<&mut SettingsPage>
pub fn current_page_mut(&mut self) -> Option<&mut SettingsPage>
Get the currently selected page mutably
Sourcepub fn current_item(&self) -> Option<&SettingItem>
pub fn current_item(&self) -> Option<&SettingItem>
Get the currently selected item
Sourcepub fn current_item_mut(&mut self) -> Option<&mut SettingItem>
pub fn current_item_mut(&mut self) -> Option<&mut SettingItem>
Get the currently selected item mutably
Sourcepub fn can_exit_text_editing(&self) -> bool
pub fn can_exit_text_editing(&self) -> bool
Check if the current text field can be exited (valid JSON if required)
Sourcepub fn entry_dialog_can_exit_text_editing(&self) -> bool
pub fn entry_dialog_can_exit_text_editing(&self) -> bool
Check if entry dialog’s current text field can be exited (valid JSON if required)
Sourcepub fn select_prev(&mut self)
pub fn select_prev(&mut self)
Move selection up
Sourcepub fn select_next(&mut self)
pub fn select_next(&mut self)
Move selection down
Sourcepub fn select_next_page(&mut self)
pub fn select_next_page(&mut self)
Move selection down by a page (viewport height worth of items)
Sourcepub fn select_prev_page(&mut self)
pub fn select_prev_page(&mut self)
Move selection up by a page (viewport height worth of items)
Sourcepub fn toggle_focus(&mut self)
pub fn toggle_focus(&mut self)
Switch focus between panels: Categories -> Settings -> Footer -> Categories
Sourcepub fn toggle_focus_backward(&mut self)
pub fn toggle_focus_backward(&mut self)
Switch focus to the previous panel: Categories <- Settings <- Footer <- Categories
Sourcepub fn update_layout_widths(&mut self)
pub fn update_layout_widths(&mut self)
Ensure the selected item is visible in the viewport Update layout_width on all items in the current page. Called before any scroll calculations so heights are correct.
pub fn ensure_visible(&mut self)
Sourcepub fn set_pending_change(&mut self, path: &str, value: Value)
pub fn set_pending_change(&mut self, path: &str, value: Value)
Record a pending change for a setting
Sourcepub fn has_changes(&self) -> bool
pub fn has_changes(&self) -> bool
Check if there are unsaved changes
Sourcepub fn apply_changes(&self, config: &Config) -> Result<Config, Error>
pub fn apply_changes(&self, config: &Config) -> Result<Config, Error>
Apply pending changes to a config
Sourcepub fn discard_changes(&mut self)
pub fn discard_changes(&mut self)
Discard all pending changes
Sourcepub fn set_target_layer(&mut self, layer: ConfigLayer)
pub fn set_target_layer(&mut self, layer: ConfigLayer)
Set the target layer for saving changes.
Sourcepub fn cycle_target_layer(&mut self)
pub fn cycle_target_layer(&mut self)
Cycle through writable layers: User -> Project -> Session -> User
Sourcepub fn target_layer_name(&self) -> &'static str
pub fn target_layer_name(&self) -> &'static str
Get a display name for the current target layer.
Sourcepub fn set_layer_sources(&mut self, sources: HashMap<String, ConfigLayer>)
pub fn set_layer_sources(&mut self, sources: HashMap<String, ConfigLayer>)
Set the layer sources map (called by Editor when opening settings). This also rebuilds pages to update modified indicators.
Sourcepub fn get_layer_source(&self, path: &str) -> ConfigLayer
pub fn get_layer_source(&self, path: &str) -> ConfigLayer
Get the source layer for a setting path. Returns the layer where this value was defined, or System if it’s the default.
Sourcepub fn layer_source_label(layer: ConfigLayer) -> &'static str
pub fn layer_source_label(layer: ConfigLayer) -> &'static str
Get a short label for a layer source (for UI display).
Sourcepub fn reset_current_to_default(&mut self)
pub fn reset_current_to_default(&mut self)
Reset the current item by removing it from the target layer.
NEW SEMANTICS: Instead of setting to schema default, we remove the value from the current layer’s delta. The value then falls back to inherited (from lower-precedence layers) or to the schema default.
Only items defined in the target layer can be reset.
Sourcepub fn on_value_changed(&mut self)
pub fn on_value_changed(&mut self)
Handle a value change from user interaction
Sourcepub fn update_focus_states(&mut self)
pub fn update_focus_states(&mut self)
Update focus states for rendering
Sourcepub fn start_search(&mut self)
pub fn start_search(&mut self)
Start search mode
Sourcepub fn cancel_search(&mut self)
pub fn cancel_search(&mut self)
Cancel search mode
Sourcepub fn set_search_query(&mut self, query: String)
pub fn set_search_query(&mut self, query: String)
Update search query and refresh results
Sourcepub fn search_push_char(&mut self, c: char)
pub fn search_push_char(&mut self, c: char)
Add a character to the search query
Sourcepub fn search_pop_char(&mut self)
pub fn search_pop_char(&mut self)
Remove the last character from the search query
Sourcepub fn search_prev(&mut self)
pub fn search_prev(&mut self)
Navigate to previous search result
Sourcepub fn search_next(&mut self)
pub fn search_next(&mut self)
Navigate to next search result
Sourcepub fn search_scroll_up(&mut self, delta: usize) -> bool
pub fn search_scroll_up(&mut self, delta: usize) -> bool
Scroll search results up by delta items
Sourcepub fn search_scroll_down(&mut self, delta: usize) -> bool
pub fn search_scroll_down(&mut self, delta: usize) -> bool
Scroll search results down by delta items
Sourcepub fn search_scroll_to_ratio(&mut self, ratio: f32) -> bool
pub fn search_scroll_to_ratio(&mut self, ratio: f32) -> bool
Scroll search results to a ratio (0.0 = top, 1.0 = bottom)
Sourcepub fn jump_to_search_result(&mut self)
pub fn jump_to_search_result(&mut self)
Jump to the currently selected search result
Sourcepub fn current_search_result(&self) -> Option<&SearchResult>
pub fn current_search_result(&self) -> Option<&SearchResult>
Get the currently selected search result
Sourcepub fn show_confirm_dialog(&mut self)
pub fn show_confirm_dialog(&mut self)
Show the unsaved changes confirmation dialog
Sourcepub fn hide_confirm_dialog(&mut self)
pub fn hide_confirm_dialog(&mut self)
Hide the confirmation dialog
Sourcepub fn confirm_dialog_next(&mut self)
pub fn confirm_dialog_next(&mut self)
Move to next option in confirmation dialog
Sourcepub fn confirm_dialog_prev(&mut self)
pub fn confirm_dialog_prev(&mut self)
Move to previous option in confirmation dialog
Sourcepub fn toggle_help(&mut self)
pub fn toggle_help(&mut self)
Toggle the help overlay
Sourcepub fn showing_entry_dialog(&self) -> bool
pub fn showing_entry_dialog(&self) -> bool
Check if the entry dialog is showing
Sourcepub fn open_entry_dialog(&mut self)
pub fn open_entry_dialog(&mut self)
Open the entry dialog for the currently focused map entry
Sourcepub fn open_add_entry_dialog(&mut self)
pub fn open_add_entry_dialog(&mut self)
Open entry dialog for adding a new entry (with empty key)
Sourcepub fn open_add_array_item_dialog(&mut self)
pub fn open_add_array_item_dialog(&mut self)
Open dialog for adding a new array item
Sourcepub fn open_edit_array_item_dialog(&mut self)
pub fn open_edit_array_item_dialog(&mut self)
Open dialog for editing an existing array item
Sourcepub fn close_entry_dialog(&mut self)
pub fn close_entry_dialog(&mut self)
Close the entry dialog without saving (pops from stack)
Sourcepub fn open_nested_entry_dialog(&mut self)
pub fn open_nested_entry_dialog(&mut self)
Open a nested entry dialog for a Map or ObjectArray field within the current dialog
This enables recursive editing: if a dialog field is itself a Map or ObjectArray, pressing Enter will open a new dialog on top of the stack for that nested structure.
Sourcepub fn save_entry_dialog(&mut self)
pub fn save_entry_dialog(&mut self)
Save the entry dialog and apply changes
Automatically detects whether this is a Map or ObjectArray dialog and handles saving appropriately.
Sourcepub fn delete_entry_dialog(&mut self)
pub fn delete_entry_dialog(&mut self)
Delete the entry from the map and close the dialog
Sourcepub fn max_scroll(&self) -> u16
pub fn max_scroll(&self) -> u16
Get the maximum scroll offset for the current page (in rows)
Sourcepub fn scroll_up(&mut self, delta: usize) -> bool
pub fn scroll_up(&mut self, delta: usize) -> bool
Scroll up by a given number of rows Returns true if the scroll offset changed
Sourcepub fn scroll_down(&mut self, delta: usize) -> bool
pub fn scroll_down(&mut self, delta: usize) -> bool
Scroll down by a given number of rows Returns true if the scroll offset changed
Sourcepub fn scroll_to_ratio(&mut self, ratio: f32) -> bool
pub fn scroll_to_ratio(&mut self, ratio: f32) -> bool
Scroll to a position based on a ratio (0.0 to 1.0) Returns true if the scroll offset changed
Sourcepub fn is_number_control(&self) -> bool
pub fn is_number_control(&self) -> bool
Start text editing mode for TextList, Text, or Map controls Check if the current control is a number input
pub fn start_editing(&mut self)
Sourcepub fn stop_editing(&mut self)
pub fn stop_editing(&mut self)
Stop text editing mode
Sourcepub fn is_editable_control(&self) -> bool
pub fn is_editable_control(&self) -> bool
Check if the current item is editable (TextList, Text, Map, or Json)
Sourcepub fn is_editing_json(&self) -> bool
pub fn is_editing_json(&self) -> bool
Check if currently editing a JSON control
Sourcepub fn text_insert(&mut self, c: char)
pub fn text_insert(&mut self, c: char)
Insert a character into the current editable control
Sourcepub fn text_backspace(&mut self)
pub fn text_backspace(&mut self)
Backspace in the current editable control
Sourcepub fn text_move_left(&mut self)
pub fn text_move_left(&mut self)
Move cursor left in the current editable control
Sourcepub fn text_move_right(&mut self)
pub fn text_move_right(&mut self)
Move cursor right in the current editable control
Sourcepub fn text_focus_prev(&mut self)
pub fn text_focus_prev(&mut self)
Move focus to previous item in TextList/Map (wraps within control)
Sourcepub fn text_focus_next(&mut self)
pub fn text_focus_next(&mut self)
Move focus to next item in TextList/Map (wraps within control)
Sourcepub fn text_add_item(&mut self)
pub fn text_add_item(&mut self)
Add new item in TextList/Map (from the new item field)
Sourcepub fn text_remove_focused(&mut self)
pub fn text_remove_focused(&mut self)
Remove the currently focused item in TextList/Map
Sourcepub fn json_cursor_up(&mut self)
pub fn json_cursor_up(&mut self)
Move cursor up in JSON editor
Sourcepub fn json_cursor_down(&mut self)
pub fn json_cursor_down(&mut self)
Move cursor down in JSON editor
Sourcepub fn json_insert_newline(&mut self)
pub fn json_insert_newline(&mut self)
Insert newline in JSON editor
Sourcepub fn json_delete(&mut self)
pub fn json_delete(&mut self)
Delete character at cursor in JSON editor
Sourcepub fn json_exit_editing(&mut self)
pub fn json_exit_editing(&mut self)
Stop JSON editing: commit if valid, revert if invalid
Sourcepub fn json_select_all(&mut self)
pub fn json_select_all(&mut self)
Select all text in JSON editor
Sourcepub fn json_selected_text(&self) -> Option<String>
pub fn json_selected_text(&self) -> Option<String>
Get selected text from JSON editor
Sourcepub fn json_cursor_up_selecting(&mut self)
pub fn json_cursor_up_selecting(&mut self)
Move cursor up with selection in JSON editor
Sourcepub fn json_cursor_down_selecting(&mut self)
pub fn json_cursor_down_selecting(&mut self)
Move cursor down with selection in JSON editor
Sourcepub fn json_cursor_left_selecting(&mut self)
pub fn json_cursor_left_selecting(&mut self)
Move cursor left with selection in JSON editor
Sourcepub fn json_cursor_right_selecting(&mut self)
pub fn json_cursor_right_selecting(&mut self)
Move cursor right with selection in JSON editor
Sourcepub fn is_dropdown_open(&self) -> bool
pub fn is_dropdown_open(&self) -> bool
Check if current item is a dropdown with menu open
Sourcepub fn dropdown_toggle(&mut self)
pub fn dropdown_toggle(&mut self)
Toggle dropdown open/closed
Sourcepub fn dropdown_prev(&mut self)
pub fn dropdown_prev(&mut self)
Select previous option in dropdown
Sourcepub fn dropdown_next(&mut self)
pub fn dropdown_next(&mut self)
Select next option in dropdown
Sourcepub fn dropdown_home(&mut self)
pub fn dropdown_home(&mut self)
Jump to first option in dropdown
Sourcepub fn dropdown_end(&mut self)
pub fn dropdown_end(&mut self)
Jump to last option in dropdown
Sourcepub fn dropdown_confirm(&mut self)
pub fn dropdown_confirm(&mut self)
Confirm dropdown selection (close and record change)
Sourcepub fn dropdown_cancel(&mut self)
pub fn dropdown_cancel(&mut self)
Cancel dropdown (restore original value and close)
Sourcepub fn dropdown_select(&mut self, option_idx: usize)
pub fn dropdown_select(&mut self, option_idx: usize)
Select a specific dropdown option by index and confirm
Sourcepub fn set_dropdown_hover(&mut self, hover_idx: Option<usize>) -> bool
pub fn set_dropdown_hover(&mut self, hover_idx: Option<usize>) -> bool
Set dropdown hover index (for mouse hover indication) Returns true if the hover index changed
Sourcepub fn dropdown_scroll(&mut self, delta: i32)
pub fn dropdown_scroll(&mut self, delta: i32)
Scroll open dropdown by delta (positive = down, negative = up)
Sourcepub fn is_number_editing(&self) -> bool
pub fn is_number_editing(&self) -> bool
Check if current item is a number input being edited
Sourcepub fn start_number_editing(&mut self)
pub fn start_number_editing(&mut self)
Start number editing mode
Sourcepub fn number_insert(&mut self, c: char)
pub fn number_insert(&mut self, c: char)
Insert a character into number input
Sourcepub fn number_backspace(&mut self)
pub fn number_backspace(&mut self)
Backspace in number input
Sourcepub fn number_confirm(&mut self)
pub fn number_confirm(&mut self)
Confirm number editing
Sourcepub fn number_cancel(&mut self)
pub fn number_cancel(&mut self)
Cancel number editing
Sourcepub fn number_delete(&mut self)
pub fn number_delete(&mut self)
Delete character forward in number input
Sourcepub fn number_move_left(&mut self)
pub fn number_move_left(&mut self)
Move cursor left in number input
Sourcepub fn number_move_right(&mut self)
pub fn number_move_right(&mut self)
Move cursor right in number input
Sourcepub fn number_move_home(&mut self)
pub fn number_move_home(&mut self)
Move cursor to start of number input
Sourcepub fn number_move_end(&mut self)
pub fn number_move_end(&mut self)
Move cursor to end of number input
Sourcepub fn number_move_left_selecting(&mut self)
pub fn number_move_left_selecting(&mut self)
Move cursor left selecting in number input
Sourcepub fn number_move_right_selecting(&mut self)
pub fn number_move_right_selecting(&mut self)
Move cursor right selecting in number input
Sourcepub fn number_move_home_selecting(&mut self)
pub fn number_move_home_selecting(&mut self)
Move cursor to start selecting in number input
Sourcepub fn number_move_end_selecting(&mut self)
pub fn number_move_end_selecting(&mut self)
Move cursor to end selecting in number input
Sourcepub fn number_move_word_left(&mut self)
pub fn number_move_word_left(&mut self)
Move word left in number input
Sourcepub fn number_move_word_right(&mut self)
pub fn number_move_word_right(&mut self)
Move word right in number input
Sourcepub fn number_move_word_left_selecting(&mut self)
pub fn number_move_word_left_selecting(&mut self)
Move word left selecting in number input
Sourcepub fn number_move_word_right_selecting(&mut self)
pub fn number_move_word_right_selecting(&mut self)
Move word right selecting in number input
Sourcepub fn number_select_all(&mut self)
pub fn number_select_all(&mut self)
Select all text in number input
Sourcepub fn number_delete_word_backward(&mut self)
pub fn number_delete_word_backward(&mut self)
Delete word backward in number input
Sourcepub fn number_delete_word_forward(&mut self)
pub fn number_delete_word_forward(&mut self)
Delete word forward in number input
Sourcepub fn get_change_descriptions(&self) -> Vec<String>
pub fn get_change_descriptions(&self) -> Vec<String>
Get list of pending changes for display
Trait Implementations§
Source§impl Debug for SettingsState
impl Debug for SettingsState
Source§impl InputHandler for SettingsState
impl InputHandler for SettingsState
Source§fn handle_key_event(
&mut self,
event: &KeyEvent,
ctx: &mut InputContext,
) -> InputResult
fn handle_key_event( &mut self, event: &KeyEvent, ctx: &mut InputContext, ) -> InputResult
Source§fn focused_child(&self) -> Option<&dyn InputHandler>
fn focused_child(&self) -> Option<&dyn InputHandler>
Source§fn focused_child_mut(&mut self) -> Option<&mut dyn InputHandler>
fn focused_child_mut(&mut self) -> Option<&mut dyn InputHandler>
Source§fn dispatch_input(
&mut self,
event: &KeyEvent,
ctx: &mut InputContext,
) -> InputResult
fn dispatch_input( &mut self, event: &KeyEvent, ctx: &mut InputContext, ) -> InputResult
Auto Trait Implementations§
impl Freeze for SettingsState
impl RefUnwindSafe for SettingsState
impl Send for SettingsState
impl Sync for SettingsState
impl Unpin for SettingsState
impl UnsafeUnpin for SettingsState
impl UnwindSafe for SettingsState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more