[][src]Struct linicon::IconIter

pub struct IconIter<'a> { /* fields omitted */ }

An iterator over the icons that have the name given to lookup_icon.

Implementations

impl<'a> IconIter<'a>[src]

pub fn from_theme(self, theme_name: impl AsRef<str>) -> Self[src]

Get icons from this theme

If this option is not set, the iterator will search in the user's icon theme if the system-theme feature is enabled (on by default) and the user's theme can be determined otherwise the default hicolor theme will be used.

Will panic if called after calling next.

pub fn with_size(self, size: u16) -> Self[src]

Search for an icon of the given size.

Will panic if called after calling next.

pub fn with_scale(self, scale: u16) -> Self[src]

Search for an icon for use with the given UI scale.

Will panic if called after calling next.

pub fn with_search_paths(
    self,
    extra_search_paths: &[impl AsRef<str>]
) -> Result<Self>
[src]

Add additional paths to search for icon themes in. These paths will be used first.

If the feature expand-paths is turn on (off by default) environment variable and ~s in paths will be expanded to their values. When this feature is enabled, if expanding a search path this function will return an error. See shellexpand::full.

This function will never return an error if the expand-paths feature is turned off.

Will panic if called after calling next.

pub fn use_fallback_themes(self, use_fallback: bool) -> Self[src]

Whether to use fallback themes (on by default).

Normally, once the iterator has exhausted icons that match the given parameters, the iterator will search through the icon theme's fallback themes. Setting this to false will prevent this behavior so that the icons will all be from the given theme.

Will panic if called after calling next.

Trait Implementations

impl<'a> Debug for IconIter<'a>[src]

impl<'a> Iterator for IconIter<'a>[src]

type Item = Result<IconPath>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> RefUnwindSafe for IconIter<'a>

impl<'a> Send for IconIter<'a>

impl<'a> Sync for IconIter<'a>

impl<'a> Unpin for IconIter<'a>

impl<'a> UnwindSafe for IconIter<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,