PDButtonsExt

Trait PDButtonsExt 

Source
pub trait PDButtonsExt: Sized + BitAnd<Self> {
Show 16 methods // Required methods fn contains(&self, other: Self) -> bool; fn contains_ref(&self, other: &Self) -> bool; fn any(&self) -> bool; fn is_empty(&self) -> bool; fn Left() -> Self; fn Right() -> Self; fn Up() -> Self; fn Down() -> Self; fn B() -> Self; fn A() -> Self; // Provided methods fn left(&self) -> bool { ... } fn right(&self) -> bool { ... } fn up(&self) -> bool { ... } fn down(&self) -> bool { ... } fn b(&self) -> bool { ... } fn a(&self) -> bool { ... }
}

Required Methods§

Source

fn contains(&self, other: Self) -> bool

Contains other button.

Note, other can contains one or many buttons. In case of there’s many buttons, returns true if at least one button of other is contained in this.

Source

fn contains_ref(&self, other: &Self) -> bool

Contains other button. Same as Self::contains but not taking ownership of other.

Source

fn any(&self) -> bool

Contains any buttons, opposite of Self::is_empty.

Source

fn is_empty(&self) -> bool

There’s no buttons

Source

fn Left() -> Self

Source

fn Right() -> Self

Source

fn Up() -> Self

Source

fn Down() -> Self

Source

fn B() -> Self

Source

fn A() -> Self

Provided Methods§

Source

fn left(&self) -> bool

Contains left button.

Source

fn right(&self) -> bool

Contains right button.

Source

fn up(&self) -> bool

Contains up button.

Source

fn down(&self) -> bool

Contains down button.

Source

fn b(&self) -> bool

Contains b button.

Source

fn a(&self) -> bool

Contains a button.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl PDButtonsExt for PDButtons

Source§

fn contains(&self, other: Self) -> bool

Source§

fn contains_ref(&self, other: &Self) -> bool

Source§

fn any(&self) -> bool

Source§

fn is_empty(&self) -> bool

Source§

fn Left() -> Self

Source§

fn Right() -> Self

Source§

fn Up() -> Self

Source§

fn Down() -> Self

Source§

fn B() -> Self

Source§

fn A() -> Self

Implementors§