Struct IconTheme

Source
pub struct IconTheme {
    pub name: Option<String>,
    pub comment: Option<String>,
    pub inherits: Option<Vec<String>>,
    pub directories: Option<Vec<Directory>>,
    pub scaled_directories: Option<Vec<String>>,
    pub hidden: Option<bool>,
    pub example: Option<String>,
}

Fields§

§name: Option<String>

[REQUIRED BY SPECS] short name of the icon theme, used in e.g. lists when selecting themes.

§comment: Option<String>

[REQUIRED BY SPECS] longer string describing the theme

§inherits: Option<Vec<String>>

The name of the theme that this theme inherits from. If an icon name is not found in the current theme, it is searched for in the inherited theme (and recursively in all the inherited themes). If no theme is specified implementations are required to add the “hicolor” theme to the inheritance tree. An implementation may optionally add other default themes in between the last specified theme and the hicolor theme.

§directories: Option<Vec<Directory>>

[REQUIRED BY SPECS] list of subdirectories for this theme. For every subdirectory there must be a section in the index.theme file describing that directory.

§scaled_directories: Option<Vec<String>>

Additional list of subdirectories for this theme, in addition to the ones in Directories. These directories should only be read by implementations supporting scaled directories and was added to keep compatibility with old implementations that don’t support these.

§hidden: Option<bool>

Whether to hide the theme in a theme selection user interface. This is used for things such as fallback-themes that are not supposed to be visible to the user.

§example: Option<String>

The name of an icon that should be used as an example of how this theme looks.

Implementations§

Source§

impl IconTheme

Implementations

Source

pub fn empty() -> Self
where Self: Sized,

Creates a blank theme, not according to specs

You must specify a name,comment, and directories to be inline with the specs

Source

pub fn from_pathbuff(file_name: PathBuf) -> Self
where Self: Sized,

Source

pub fn new(file_name: String) -> Self
where Self: Sized,

Creates a new struct from a full desktop file path

Trait Implementations§

Source§

impl Clone for IconTheme

Source§

fn clone(&self) -> IconTheme

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IconTheme

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.