pub struct App {Show 44 fields
pub vault: Vault,
pub vault_manager: VaultManager,
pub vault_selector: VaultSelector,
pub screen: Screen,
pub master_input: String,
pub master_confirm_input: String,
pub master_mode_is_setup: bool,
pub unlock_focus: UnlockField,
pub error: Option<String>,
pub items: Vec<Item>,
pub selected: usize,
pub view_mode: ViewMode,
pub filtered_items: Vec<Item>,
pub search_query: String,
pub search_mode: bool,
pub add_name: String,
pub add_kind_idx: usize,
pub add_value: String,
pub add_value_scroll: usize,
pub status_message: Option<String>,
pub status_type: StatusType,
pub scroll_offset: usize,
pub add_value_textarea: TextArea<'static>,
pub auto_lock_service: Option<Arc<AutoLockService>>,
pub auto_locked: bool,
pub countdown_info: Option<CountdownInfo>,
pub ck_current: String,
pub ck_new: String,
pub ck_confirm: String,
pub ck_focus: ChangeKeyField,
pub add_focus: AddItemField,
pub view_item: Option<Item>,
pub view_show_value: bool,
pub edit_item: Option<Item>,
pub edit_value: String,
pub gen_focus: PasswordGenField,
pub gen_length_str: String,
pub gen_config: PasswordConfig,
pub generated_password: Option<String>,
pub ie_focus: ImportExportField,
pub ie_mode: ImportExportMode,
pub ie_path: String,
pub ie_format_idx: usize,
pub ie_formats: Vec<&'static str>,
}Fields§
§vault: Vault§vault_manager: VaultManager§vault_selector: VaultSelector§screen: Screen§master_input: String§master_confirm_input: String§master_mode_is_setup: bool§unlock_focus: UnlockField§error: Option<String>§items: Vec<Item>§selected: usize§view_mode: ViewMode§filtered_items: Vec<Item>§search_query: String§search_mode: bool§add_name: String§add_kind_idx: usize§add_value: String§add_value_scroll: usize§status_message: Option<String>§status_type: StatusType§scroll_offset: usize§add_value_textarea: TextArea<'static>§auto_lock_service: Option<Arc<AutoLockService>>§auto_locked: bool§countdown_info: Option<CountdownInfo>§ck_current: String§ck_new: String§ck_confirm: String§ck_focus: ChangeKeyField§add_focus: AddItemField§view_item: Option<Item>§view_show_value: bool§edit_item: Option<Item>§edit_value: String§gen_focus: PasswordGenField§gen_length_str: String§gen_config: PasswordConfig§generated_password: Option<String>§ie_focus: ImportExportField§ie_mode: ImportExportMode§ie_path: String§ie_format_idx: usize§ie_formats: Vec<&'static str>Implementations§
Source§impl App
impl App
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Initializes a new instance of the struct.
This function creates or opens a vault, determines whether the master mode setup is required, and initializes the various fields required for managing the application state.
§Returns
Result<Self>: AResultcontaining the initialized struct instance on success, or an error if the vault fails to open or create.
§Fields
vault: Handles secure storage by opening or creating a vault.screen: Represents the current active screen, initialized to theUnlockscreen.master_input: Stores user input for the master password during setup or unlock phase.master_confirm_input: Stores user input for confirming the master password during setup.master_mode_is_setup: Indicates whether the master mode is set up (false if initialization is incomplete).unlock_focus: Tracks which unlock field is currently focused (e.g., Master field).error: Holds any error message or state, defaulted toNone.items: A vector holding all items stored in the vault.selected: Tracks the index of the currently selected item in the items list.view_mode: Specifies the current filter/view mode for items (e.g., All items).filtered_items: A vector holding the subset of items that match the current search query or filter.search_query: Stores the user’s current search input or query.add_name: Field for the name of an item to be added.add_kind_idx: Indicates the index of the kind/type of the item being added.add_value: The value of the item being added.add_value_scroll: Tracks the scroll state for long values when adding an item.status_message: Holds transient status messages to display to the user.status_type: Indicates the type of status message (e.g., Info, Warning, Error).
§Change Key Fields
ck_current: Stores the current master key value.ck_new: Stores the new master key value.ck_confirm: Confirms the new master key value.ck_focus: Tracks which field is focused during the change key process.
§Add Item Fields
add_focus: Tracks which field is focused when adding a new item (e.g., Name).
§Viewing and Editing Items
view_item: The currently selected item for viewing, if any.view_show_value: Indicates whether to reveal the value of the viewed item.edit_item: The item currently being edited, if any.edit_value: The edited value of the currently selected item.
§Password Generation
gen_focus: The current focus field in the password generation process (e.g., Length).gen_length_str: String representation of the desired password length (default: “16”).gen_config: Configuration settings for password generation (e.g., character set, length).generated_password: Holds the last generated password, if any.
§Import/Export
ie_focus: Tracks which field is focused during import/export operations (e.g., File Path).ie_mode: Indicates the mode (Import or Export) for import/export operations.ie_path: Stores the file path selected for import/export.ie_format_idx: Tracks the index of the currently selected format for import/export.ie_formats: A vector containing supported file formats for import/export (e.g., “json”, “csv”).
§Errors
Return an error if the vault cannot be opened or created successfully.
§Panics
Sourcepub fn unlock(&mut self) -> Result<()>
pub fn unlock(&mut self) -> Result<()>
Unlocks the application vault using the provided master key and performs necessary validations.
This function checks if the master key setup process is initiated, validates the user input, and sets up or unlocks the vault accordingly. In case of errors during validation or unlocking operations, appropriate error messages are set.
§Steps
- If
master_mode_is_setupis true:- Validate the presence of master input and confirmation input. If either is empty, an error message is set, and the function will return early.
- Compare
master_inputandmaster_confirm_input. If they do not match, an error message is set, and the function exits. - Validate the strength of the
master_inputusingvalidate_master_strength. If it fails, sets an error message and exits. - Initialize the vault with
master_inputand reset themaster_mode_is_setupflag to false.
- Unlock the vault with the provided
master_input. On failure to unlock, sets an error message with the reason and exits with the corresponding error. - Refresh the items in the application to reflect the unlocked state.
- Set the current screen to
Screen::Main. - Clear any existing error messages to indicate successful operation.
- Return
Ok(())if no errors occurred.
§Returns
Ok(())on successful unlocking and initialization of the vault.Errwith the propagation of error from validation or unlocking operations.
§Errors
This function sets the error field with one of the following messages on failure:
- “Please enter and confirm your master key.” - if either master input or confirmation input is missing.
- “Master keys do not match.” - if the confirmation of the master key does not match the input.
- Error message returned by
validate_master_strength- if the master key is deemed weak or invalid. - “Unlock failed: {e}” - if unlocking the vault fails.
§Side Effects
- Updates the
errorfield in the struct to reflect any issues encountered during execution. - Modifies the state of
screen,master_mode_is_setup, andvaultupon successful execution.
Sourcepub fn refresh_items(&mut self) -> Result<()>
pub fn refresh_items(&mut self) -> Result<()>
Refreshes the list of items and updates the filtered items.
This method performs the following actions:
- Updates the
itemsfield by retrieving the latest list of items from thevault. - Applies filtering logic to update the
filtered_itemslist. - Ensures that the current selection (
selected) is within the bounds of the updatedfiltered_itemslist. If the current selection is out of bounds but thefiltered_itemslist is not empty, it adjustsselectedto the last valid index.
§Errors
Returns an error if fetching the list of items from the vault fails.
§Returns
Ok(())if the operation is successful.Errwith the specific error encountered when listing items from thevault.
pub fn update_filtered_items(&mut self)
pub fn get_selected_item(&self) -> Option<&Item>
pub fn get_item_counts(&self) -> ItemCounts
Sourcepub fn add_item(&mut self) -> Result<()>
pub fn add_item(&mut self) -> Result<()>
Adds a new item to the vault with the specified details and updates the UI.
§Description
This function creates a new item based on the user input, validates it, and stores it in the vault. If the operation is successful, the UI is updated to reflect the addition and the input fields are reset. If an error occurs, appropriate error messages and statuses are set.
§Fields Used
add_kind_idx: Determines the type of item being added (e.g.,Password,EnvVar,Note, etc.).add_name: The name of the new item, trimmed of whitespace.add_value_textarea: The content or value of the new item, usually multi-line.vault: The storage structure which handles item creation.add_value: Secondary field for item value, cleared after addition.add_value_scroll: Resets the scroll position of the textarea after addition.screen: Sets the screen to the main view upon successful addition.error: Displays error messages for failed operations.status: Updates the user-visible status of the addition operation.
§Process
- Determines the item type (
kind) based onadd_kind_idx:0-> Password1-> Environment Variable3-> API Key4-> SSH Key5-> Certificate6-> Database- Default -> Note
- Fetches the item’s value from the textarea (
add_value_textarea), joining multiple lines with\n. - Creates a
NewItemstructure with the gathered data. - Attempts to add the item using
vault.create_item. - Handles responses:
- Success: Resets input fields, updates item list, switches to the main screen, and displays a success message.
- Failure: If the name already exists, prompts the user to choose a different name. For other errors, displays a generic error message.
§Returns
Returns an Ok(()) on successful completion of the process or propagates an error if any step fails.
§Errors
- Returns an error if refreshing the items (
refresh_items) fails. - Updates the
errorandstatusfields with detailed context if item creation fails.
§Notes
- Resets both single-line (
add_value) and multi-line (add_value_textarea) value fields upon successful addition. - Automatically trims leading and trailing whitespace from the item name.
Sourcepub fn delete_selected(&mut self) -> Result<()>
pub fn delete_selected(&mut self) -> Result<()>
Deletes the currently selected item from the vault.
This function retrieves the currently selected item, deletes it from the vault using its unique identifier, and then refreshes the list of items to reflect the changes. If no item is selected, the function does nothing.
§Errors
Returns an error if:
- Retrieving the selected item fails.
- Deleting the item from the vault fails.
- Refreshing the item list fails.
Sourcepub fn change_master(&mut self) -> Result<()>
pub fn change_master(&mut self) -> Result<()>
Changes the master key for the application if provided inputs meet the necessary conditions.
This function performs several validations to ensure the master key change process is secure:
- It checks if all required input fields (
ck_current,ck_new, andck_confirm) are filled. - It validates that the new master key (
ck_new) matches the confirmation key (ck_confirm). - It verifies the strength of the new master key using the
validate_master_strengthmethod.
If any of these conditions fail, an appropriate error message is stored in the error field,
and the process halts without changing the master key.
Once all validations are passed, the function updates the master key by calling the
change_master_key method of the vault. After a successful update, it clears all input fields,
resets the error message, and navigates back to the main screen.
§Returns
Ok(())- If the master key has been successfully changed or the process ended due to a validation failure without panicking.Err(Error)- If an error occurs while attempting to change the key in thevault.
§Errors
- If any of the following conditions occur, an error is stored in the
errorfield, and the function returnsOk:- Any of the required fields (
ck_current,ck_new, orck_confirm) are empty. - The new master key and confirmation key do not match.
- The new master key fails the strength validation.
- Any of the required fields (
- If the
vault.change_master_keymethod returns an error, it will propagate as aResult::Err.
Sourcepub fn copy_selected(&mut self) -> Result<()>
pub fn copy_selected(&mut self) -> Result<()>
Copies the currently selected item to the clipboard.
This function retrieves the currently selected item using the get_selected_item method.
If an item is selected, it initializes the system clipboard, attempts to copy the selected
item’s value to the clipboard, and updates the status message to indicate success.
§Returns
Ok(())- If the item is successfully copied to the clipboard or no item is selected.Err(anyhow::Error)- If there’s an error while accessing the clipboard or copying the item to the clipboard.
§Errors
- Returns an error if accessing the clipboard fails.
- Returns an error if copying the selected item’s value to the clipboard fails.
§Behavior
-
If no item is selected (
get_selected_itemreturnsNone), the function does nothing and returnsOk(()). -
If an item is selected (
get_selected_itemreturnsSome), it:- Initializes a new
arboard::Clipboardinstance. - Copies the
valueof the selected item to the clipboard. - Sets a status message indicating that the item has been successfully copied to the clipboard.
- Initializes a new
§Dependencies
This function relies on the arboard crate for clipboard interactions and the anyhow crate
for error handling. It also assumes the existence of the following methods:
get_selected_item: Retrieves the currently selected item, returning an option.set_status: Updates the application’s status message and type.
pub fn view_selected(&mut self)
pub const fn toggle_value_visibility(&mut self)
pub fn edit_selected(&mut self)
Sourcepub fn save_edit(&mut self) -> Result<()>
pub fn save_edit(&mut self) -> Result<()>
Attempts to save edits made to an item in the vault and updates the user interface accordingly.
§Behavior
- If the
edit_valueis empty (after trimming), it sets an error message (“Value cannot be empty”) and exits early. - Otherwise, it updates the item in the vault identified by
edit_item.idwith the newedit_value. - After updating the item, it clears the
edit_itemandedit_value, refreshes the list of items, and switches the application’s screen back to the main screen while clearing any previous errors.
§Errors
- If updating the vault fails, an error is propagated from the
vault.update_itemmethod. - If refreshing items fails, an error is propagated from the
refresh_itemsmethod.
§Returns
Ok(())if the edit is successfully saved or if theedit_valueis empty.Errif an error occurs during vault updates or refreshing items.
§Fields/State
self.edit_item: The item currently being edited. IfNone, the method does nothing.self.edit_value: The new value to be saved to the item. If empty (once trimmed), the method sets an error message and exits early.self.error: An optional error message for display purposes. This is set if theedit_valueis empty or cleared on successful operation.self.vault: The storage mechanism used to update the item.self.screen: Controls the application screen flow. Set toScreen::Mainafter a successful edit.
pub fn open_password_generator(&mut self)
pub fn generate_password(&mut self)
Sourcepub fn copy_generated_password(&mut self) -> Result<()>
pub fn copy_generated_password(&mut self) -> Result<()>
Copies the generated password to the system clipboard.
This function attempts to access the generated password stored in the self.generated_password
field and copies it to the system clipboard using the arboard crate. If the operation succeeds,
a success message is set in the self.error field. In the event of an error while accessing the
clipboard or copying the text, the function returns a corresponding error.
§Returns
Ok(())- If the password is successfully copied to the clipboard or no password was generated.Err(anyhow::Error)- If accessing the clipboard or copying the password fails.
§Errors
This function may return an error in the following scenarios:
- Failure to access or initialize the system clipboard.
- Failure to copy the generated password to the clipboard.
§Side Effects
- If a password is successfully copied to the clipboard, the
self.errorfield is set with a success message.
§Dependencies
This function makes use of the arboard crate for clipboard access and text manipulation.
pub fn use_generated_password(&mut self)
pub fn open_import_export(&mut self, mode: ImportExportMode)
Sourcepub fn execute_import_export(&mut self) -> Result<()>
pub fn execute_import_export(&mut self) -> Result<()>
Executes the import or export operation based on the current application state.
This method performs the following operations:
- Validates the provided file path and ensures it is not empty.
- Normalizes the file path to handle different path separators and expand the home directory.
- Determines the format of import/export (CSV, JSON, or backup).
- Executes the import or export operation based on the selected mode (
ImportExportMode).
§Export Mode
- Creates necessary parent directories if they do not exist.
- Exports the current items to the specified file path in the selected format.
- Sets an appropriate success message indicating the number of items exported and the file path.
§Import Mode
- Ensures the specified file exists before proceeding.
- Imports items from the file in the specified format.
- Avoids importing duplicate items by checking against existing item names.
- Records the number of imported and skipped items due to duplication or errors.
- Updates the item list after a successful import and presents an appropriate summary message.
§Errors
- If the file path is empty, a user-friendly error message is set and the operation is aborted.
- If a directory creation fails during export, an error is returned.
- If certain items cannot be imported due to conflicts or other errors, they are counted as skipped.
§Remarks
- Upon completion (successful or not), the application state is updated to the main screen.
§Returns
Ok(())if the operation completes successfully (even if some items were skipped).Errif a file path normalization or file operation fails during the execution.
§Preconditions
self.ie_pathmust be set to a valid file path.- The
self.ie_formatsarray must include supported formats (“csv”, “backup”, “json”). - The
self.itemslist is expected to contain the current application items for export/import validation.
§Postconditions
- Updates
self.errorwith a descriptive message about the operation result. - Changes the application state screen to
Screen::Main.
pub fn set_status(&mut self, message: String, status_type: StatusType)
pub fn clear_status(&mut self)
pub fn is_in_input_mode(&self) -> bool
Sourcepub fn paste_to_add_value(&mut self) -> Result<()>
pub fn paste_to_add_value(&mut self) -> Result<()>
Pastes content from the clipboard to the add item value field.
This function retrieves text content from the system clipboard and appends it to
the current add_value field. If the clipboard contains text, it will be added
to the existing value. If accessing the clipboard fails, an appropriate status
message is displayed.
§Returns
Ok(())- If the paste operation completes successfully or if there’s no text in clipboard.Err(anyhow::Error)- If accessing the clipboard fails.
§Errors
- Returns an error if accessing the clipboard fails.
- Sets a warning status if the clipboard is empty or contains no text.
§Behavior
- Retrieves text from the system clipboard using
arboard::Clipboard. - Appends the clipboard content to the current
add_valuefield. - Sets a success status message indicating the paste operation completed.
- If clipboard is empty or contains no text, shows a warning message.
pub fn open_vault_selector(&mut self)
Sourcepub fn handle_vault_action(&mut self, action: VaultAction) -> Result<()>
pub fn handle_vault_action(&mut self, action: VaultAction) -> Result<()>
Handles various actions related to vault management.
This function processes the provided VaultAction and executes the corresponding logic
to manage vaults, such as creating, updating, deleting, importing, and more.
§Arguments
action- AVaultActionenum that specifies the action to be performed. Each variant ofVaultActioncorresponds to a specific vault-related operation.
§Returns
Result<()>- ReturnsOk(())if the action was processed successfully; otherwise, an error is returned if any operation fails.
§VaultAction Variants
-
VaultAction::Switch(vault_id)Switches to the specified vault by its ID. -
VaultAction::Create { name, description, category }Creates a new vault with the provided name, description, and category. -
VaultAction::Update { vault_id, name, description, category, favorite }Updates an existing vault with the given parameters, including optional fields like the vault name, description, category, and favorite status. -
VaultAction::Delete { vault_id, delete_file }Deletes a vault specified by its ID. Ifdelete_fileis true, related files are also deleted. -
VaultAction::Import { path }Imports a vault from a specified file path. -
VaultAction::RefreshReloads the list of available vaults and updates the UI to reflect any changes. Sets a success status message indicating the vaults have been refreshed. -
VaultAction::CloseHides the vault selector and switches back to the main screen. -
VaultAction::ShowHelpDisplays help information. (This action may be handled or ignored based on needs.)
§Errors
Returns an error if:
- Switching to a vault fails.
- The requested vault action encounters an issue (e.g., file access issues during imports or failures in vault creation/deletion).
pub async fn update_activity(&mut self)
pub async fn check_auto_lock(&mut self) -> bool
pub async fn get_time_until_auto_lock(&self) -> Option<Duration>
pub async fn update_countdown_info(&mut self)
pub const fn get_countdown_info(&self) -> Option<&CountdownInfo>
Auto Trait Implementations§
impl !Freeze for App
impl !RefUnwindSafe for App
impl Send for App
impl !Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl !UnwindSafe for App
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> 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