pub enum DestinationIcon {
Icon(IconData),
Glyph(String),
}Expand description
What a destination shows above or beside its label: a drawn icon, or a text glyph.
Both, because both are real. An IconData is what an application reaches for now
that there is an icon set — it scales, it takes the theme’s colour, and it is the same
mark at every size. A glyph is an emoji or a Unicode character, which is what a
destination could carry before there was a set, and is still the shortest way to put a
flag or a rocket in a bar.
Nothing has to name this type: From covers &str, String, char and
IconData, so item(Icons::HOME, "Home") and item("🏠", "Home") are both just
calls to item.
Variants§
Icon(IconData)
A drawn icon — one of the bundled set, or one of the caller’s own.
Glyph(String)
A text glyph: an emoji, or a Unicode character.
Trait Implementations§
Source§impl Clone for DestinationIcon
impl Clone for DestinationIcon
Source§impl Debug for DestinationIcon
impl Debug for DestinationIcon
Source§impl Default for DestinationIcon
impl Default for DestinationIcon
Source§impl From<&String> for DestinationIcon
impl From<&String> for DestinationIcon
Source§impl From<&str> for DestinationIcon
impl From<&str> for DestinationIcon
Source§impl From<IconData> for DestinationIcon
impl From<IconData> for DestinationIcon
Source§impl From<String> for DestinationIcon
impl From<String> for DestinationIcon
Source§impl From<char> for DestinationIcon
impl From<char> for DestinationIcon
Source§impl PartialEq for DestinationIcon
impl PartialEq for DestinationIcon
impl StructuralPartialEq for DestinationIcon
Auto Trait Implementations§
impl Freeze for DestinationIcon
impl RefUnwindSafe for DestinationIcon
impl Send for DestinationIcon
impl Sync for DestinationIcon
impl Unpin for DestinationIcon
impl UnsafeUnpin for DestinationIcon
impl UnwindSafe for DestinationIcon
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