pub enum ControllerUpdate {
Raw(ControllerState),
UUID(String),
}
Expand description
A method of retrieving a controller’s current state.
Variants§
Raw(ControllerState)
Implementors can send raw controller state to the simulator, allowing for keyboard-and-mouse-based control.
UUID(String)
Implementors can can send the UUID of a physical controller (more efficient and allows for SDL2 mappings).
Trait Implementations§
Source§impl Clone for ControllerUpdate
impl Clone for ControllerUpdate
Source§fn clone(&self) -> ControllerUpdate
fn clone(&self) -> ControllerUpdate
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ControllerUpdate
impl Debug for ControllerUpdate
Source§impl<'de> Deserialize<'de> for ControllerUpdate
impl<'de> Deserialize<'de> for ControllerUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ControllerUpdate
impl Hash for ControllerUpdate
Source§impl Ord for ControllerUpdate
impl Ord for ControllerUpdate
Source§fn cmp(&self, other: &ControllerUpdate) -> Ordering
fn cmp(&self, other: &ControllerUpdate) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ControllerUpdate
impl PartialEq for ControllerUpdate
Source§impl PartialOrd for ControllerUpdate
impl PartialOrd for ControllerUpdate
Source§impl Serialize for ControllerUpdate
impl Serialize for ControllerUpdate
impl Eq for ControllerUpdate
impl StructuralPartialEq for ControllerUpdate
Auto Trait Implementations§
impl Freeze for ControllerUpdate
impl RefUnwindSafe for ControllerUpdate
impl Send for ControllerUpdate
impl Sync for ControllerUpdate
impl Unpin for ControllerUpdate
impl UnwindSafe for ControllerUpdate
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