pub enum Symbol {
Check,
X,
Exclamation,
Question,
At,
Hash,
Dollar,
Percent,
Ampersand,
Copyright,
Trademark,
Registered,
}Expand description
General symbols for common UI elements and indicators
This enum provides access to commonly used symbols with support for different Unicode themes. Each symbol can be rendered in four different styles depending on the terminal capabilities and user preferences.
§Examples
use unicode_rs::prelude::*;
// Basic usage
let check = Symbol::Check.get_char(UnicodeTheme::Rich);
println!("Task completed {}", check); // Task completed ✓
// Compare themes
for theme in [UnicodeTheme::Minimal, UnicodeTheme::Rich] {
let symbol = Symbol::X.get_char(theme);
println!("Error symbol in {:?} theme: {}", theme, symbol);
}Variants§
Check
Checkmark symbol - indicates success, completion, or affirmative state
§Theme variants
- Minimal:
v - Basic:
✓ - Rich:
✓ - Fancy:
✅
X
X mark symbol - indicates failure, error, or negative state
§Theme variants
- Minimal:
X - Basic:
✗ - Rich:
✖ - Fancy:
❌
Exclamation
Exclamation symbol - indicates warning or important information
§Theme variants
- Minimal:
! - Basic:
! - Rich:
❗ - Fancy:
❗
Question
Question mark symbol - indicates uncertainty or help
§Theme variants
- Minimal:
? - Basic:
? - Rich:
❓ - Fancy:
❓
At
At symbol
Hash
Hash/pound
Dollar
Dollar sign
Percent
Percent
Ampersand
Ampersand
Copyright
Copyright
Trademark
Trademark
Registered
Registered
Trait Implementations§
Source§impl UnicodeProvider for Symbol
impl UnicodeProvider for Symbol
impl Copy for Symbol
impl Eq for Symbol
impl StructuralPartialEq for Symbol
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
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
Mutably borrows from an owned value. Read more