[][src]Enum penrose::core::ring::Selector

pub enum Selector<'a, T> {
    Any,
    Focused,
    Index(usize),
    WinId(WinId),
    Condition(&'a dyn Fn(&T) -> bool),
}

Used with WindowManager helper functions to select an element from the known workspaces or clients.

Variants

Any

Any element in the target collection.

For functions returning a single elemt this is equivalent to Focused, for functions returning multiple elements this will return the entire collection.

Focused

The focused element of the target collection.

Index(usize)

The element at this index.

WinId(WinId)

The element with/containing this client ID.

Condition(&'a dyn Fn(&T) -> bool)

The first element satisfying this condition.

Trait Implementations

impl<'a, T: Clone> Clone for Selector<'a, T>[src]

impl<'a, T: Copy> Copy for Selector<'a, T>[src]

impl<'a, T> Debug for Selector<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for Selector<'a, T>[src]

impl<'a, T> !Send for Selector<'a, T>[src]

impl<'a, T> !Sync for Selector<'a, T>[src]

impl<'a, T> Unpin for Selector<'a, T>[src]

impl<'a, T> !UnwindSafe for Selector<'a, T>[src]

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<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.