pub enum StockIcon {
Application,
Warning,
Error,
Information,
Shield,
}Expand description
A stock icon provided by the operating system.
A closed set rather than a free-form string. A name the OS does not know can only fail at runtime, and a caller has no way to discover which names are valid; an enum makes the answer a compile error instead. The variants are the ones with a direct equivalent on every platform this could grow to, so the set stays meaningful rather than becoming Windows constants wearing generic names.
Variants§
Application
The application’s own default icon.
Warning
Warning: a hazard the user should notice.
Error
Error: something has already gone wrong.
Information
Information: neutral notice.
Shield
Shield: an elevation or security prompt.
Implementations§
Source§impl StockIcon
impl StockIcon
Sourcepub fn osc_name(self) -> &'static str
pub fn osc_name(self) -> &'static str
The symbolic name sent by the OSC 1 fallback.
freedesktop icon-naming-spec names rather than this crate’s variant spelling: a terminal or window manager that does anything at all with OSC 1 looks the name up in the desktop icon theme, so a bespoke name would resolve to nothing on every host.
Trait Implementations§
impl Copy for StockIcon
impl Eq for StockIcon
impl StructuralPartialEq for StockIcon
Auto Trait Implementations§
impl Freeze for StockIcon
impl RefUnwindSafe for StockIcon
impl Send for StockIcon
impl Sync for StockIcon
impl Unpin for StockIcon
impl UnsafeUnpin for StockIcon
impl UnwindSafe for StockIcon
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<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