#[non_exhaustive]pub enum IconRole {
Show 42 variants
DialogWarning,
DialogError,
DialogInfo,
DialogQuestion,
DialogSuccess,
Shield,
WindowClose,
WindowMinimize,
WindowMaximize,
WindowRestore,
ActionSave,
ActionDelete,
ActionCopy,
ActionPaste,
ActionCut,
ActionUndo,
ActionRedo,
ActionSearch,
ActionSettings,
ActionEdit,
ActionAdd,
ActionRemove,
ActionRefresh,
ActionPrint,
NavBack,
NavForward,
NavUp,
NavDown,
NavHome,
NavMenu,
FileGeneric,
FolderClosed,
FolderOpen,
TrashEmpty,
TrashFull,
StatusBusy,
StatusCheck,
StatusError,
UserAccount,
Notification,
Help,
Lock,
}Expand description
Semantic icon roles for cross-platform icon resolution.
Each variant represents a conceptual icon role (not a specific icon image).
Platform-specific icon identifiers are resolved via
icon_name() using an IconSet.
§Categories
Variants are grouped by prefix into 7 categories:
- Dialog (6): Alerts and dialog indicators
- Window (4): Window control buttons
- Action (14): Common user actions
- Navigation (6): Directional and structural navigation
- Files (5): File and folder representations
- Status (3): State indicators
- System (4): System-level UI elements
§Examples
use native_theme::IconRole;
let role = IconRole::ActionSave;
match role {
IconRole::ActionSave => println!("save icon"),
_ => println!("other icon"),
}
// Iterate all roles
assert_eq!(IconRole::ALL.len(), 42);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DialogWarning
Warning indicator for dialogs
DialogError
Error indicator for dialogs
DialogInfo
Informational indicator for dialogs
DialogQuestion
Question indicator for dialogs
DialogSuccess
Success/confirmation indicator for dialogs
Shield
Security/shield indicator
WindowClose
Close window button
WindowMinimize
Minimize window button
WindowMaximize
Maximize window button
WindowRestore
Restore window button (from maximized state)
ActionSave
Save action
ActionDelete
Delete action
ActionCopy
Copy to clipboard
ActionPaste
Paste from clipboard
ActionCut
Cut to clipboard
ActionUndo
Undo last action
ActionRedo
Redo last undone action
ActionSearch
Search / find
ActionSettings
Settings / preferences
ActionEdit
Edit / modify
ActionAdd
Add / create new item
ActionRemove
Remove item
ActionRefresh
Refresh / reload
ActionPrint
Navigate backward
Navigate forward
Navigate up in hierarchy
Navigate down in hierarchy
Navigate to home / root
Open menu / hamburger
FileGeneric
Generic file icon
FolderClosed
Closed folder
FolderOpen
Open folder
TrashEmpty
Empty trash / recycle bin
TrashFull
Full trash / recycle bin
StatusBusy
Busy / working state indicator
StatusCheck
Check / success indicator
StatusError
Error state indicator
UserAccount
User account / profile
Notification
Notification / bell
Help
Help / question mark
Lock
Lock / security
Implementations§
Trait Implementations§
Source§impl IconProvider for IconRole
impl IconProvider for IconRole
impl Copy for IconRole
impl Eq for IconRole
impl StructuralPartialEq for IconRole
Auto Trait Implementations§
impl Freeze for IconRole
impl RefUnwindSafe for IconRole
impl Send for IconRole
impl Sync for IconRole
impl Unpin for IconRole
impl UnsafeUnpin for IconRole
impl UnwindSafe for IconRole
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 more