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§
Sourcefn contains(&self, other: Self) -> bool
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.
Sourcefn contains_ref(&self, other: &Self) -> bool
fn contains_ref(&self, other: &Self) -> bool
Contains other button.
Same as Self::contains but not taking ownership of other.
Sourcefn any(&self) -> bool
fn any(&self) -> bool
Contains any buttons, opposite of Self::is_empty.
fn Left() -> Self
fn Right() -> Self
fn Up() -> Self
fn Down() -> Self
fn B() -> Self
fn A() -> Self
Provided Methods§
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.