pub struct IconString {
pub content: String,
}
Expand description
Represents an icon specification that can be either a file path or an icon name from the system theme.
Fields§
§content: String
The icon specification string
Implementations§
Source§impl IconString
impl IconString
Sourcepub fn get_icon_path(&self) -> Option<PathBuf>
pub fn get_icon_path(&self) -> Option<PathBuf>
Attempts to find the icon’s full path on the system.
First checks if the content is a direct path to an existing file. If not, looks up the icon name in the freedesktop icon theme system.
§Returns
Some(PathBuf)
if the icon is found either as a file or in the icon themeNone
if the icon cannot be found
Trait Implementations§
Source§impl Clone for IconString
impl Clone for IconString
Source§fn clone(&self) -> IconString
fn clone(&self) -> IconString
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for IconString
impl Debug for IconString
Source§impl Default for IconString
impl Default for IconString
Source§fn default() -> IconString
fn default() -> IconString
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IconString
impl RefUnwindSafe for IconString
impl Send for IconString
impl Sync for IconString
impl Unpin for IconString
impl UnwindSafe for IconString
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