#[non_exhaustive]pub enum IconSet {
SfSymbols,
SegoeIcons,
Freedesktop,
Material,
Lucide,
}Expand description
Known icon sets that provide platform-specific icon identifiers.
Each variant corresponds to a well-known icon naming system.
Use from_name to parse from TOML strings
and name to serialize back to kebab-case.
§Examples
use native_theme::IconSet;
let set = IconSet::from_name("sf-symbols").unwrap();
assert_eq!(set, IconSet::SfSymbols);
assert_eq!(set.name(), "sf-symbols");
// Round-trip
let name = IconSet::Material.name();
assert_eq!(IconSet::from_name(name), Some(IconSet::Material));
// Unknown names return None
assert_eq!(IconSet::from_name("unknown"), None);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SfSymbols
Apple SF Symbols (macOS, iOS).
SegoeIcons
Microsoft Segoe Fluent Icons (Windows).
Freedesktop
freedesktop Icon Naming Specification (Linux).
Material
Google Material Symbols.
Lucide
Lucide Icons (fork of Feather).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IconSet
impl<'de> Deserialize<'de> for IconSet
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for IconSet
impl Eq for IconSet
impl StructuralPartialEq for IconSet
Auto Trait Implementations§
impl Freeze for IconSet
impl RefUnwindSafe for IconSet
impl Send for IconSet
impl Sync for IconSet
impl Unpin for IconSet
impl UnsafeUnpin for IconSet
impl UnwindSafe for IconSet
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