pub struct Buttons(/* private fields */);
Implementations§
Source§impl Buttons
impl Buttons
pub fn new() -> Self
Sourcepub fn get(self, id: u32) -> bool
pub fn get(self, id: u32) -> bool
§Panics
If id is too large for the libretro controller API (0..16)
pub fn up(self, b: bool) -> Self
pub fn down(self, b: bool) -> Self
pub fn left(self, b: bool) -> Self
pub fn right(self, b: bool) -> Self
pub fn select(self, b: bool) -> Self
pub fn start(self, b: bool) -> Self
pub fn a(self, b: bool) -> Self
pub fn b(self, b: bool) -> Self
pub fn y(self, b: bool) -> Self
pub fn x(self, b: bool) -> Self
pub fn l1(self, b: bool) -> Self
pub fn r1(self, b: bool) -> Self
pub fn l2(self, b: bool) -> Self
pub fn r2(self, b: bool) -> Self
pub fn l3(self, b: bool) -> Self
pub fn r3(self, b: bool) -> Self
pub fn get_up(self) -> bool
pub fn get_down(self) -> bool
pub fn get_left(self) -> bool
pub fn get_right(self) -> bool
pub fn get_select(self) -> bool
pub fn get_start(self) -> bool
pub fn get_a(self) -> bool
pub fn get_b(self) -> bool
pub fn get_y(self) -> bool
pub fn get_x(self) -> bool
pub fn get_l1(self) -> bool
pub fn get_r1(self) -> bool
pub fn get_l2(self) -> bool
pub fn get_r2(self) -> bool
pub fn get_l3(self) -> bool
pub fn get_r3(self) -> bool
Trait Implementations§
Source§impl Ord for Buttons
impl Ord for Buttons
Source§impl PartialOrd for Buttons
impl PartialOrd for Buttons
impl Copy for Buttons
impl Eq for Buttons
impl StructuralPartialEq for Buttons
Auto Trait Implementations§
impl Freeze for Buttons
impl RefUnwindSafe for Buttons
impl Send for Buttons
impl Sync for Buttons
impl Unpin for Buttons
impl UnwindSafe for Buttons
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.