#[non_exhaustive]pub struct TickInput {
pub seats: Vec<SeatInput>,
}Expand description
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.seats: Vec<SeatInput>Each seat’s input, by seat number.
Implementations§
Source§impl TickInput
impl TickInput
Sourcepub fn new(seats: Vec<SeatInput>) -> Self
pub fn new(seats: Vec<SeatInput>) -> Self
The input of seats, by seat number from 0: the first
MAX_SEATS of them.
Sourcepub fn seat(&self, seat: usize) -> Option<&SeatInput>
pub fn seat(&self, seat: usize) -> Option<&SeatInput>
Seat seat’s input, if it has a seat that far.
Sourcepub fn is_pressed(&self, seat: usize, action: ActionId) -> bool
pub fn is_pressed(&self, seat: usize, action: ActionId) -> bool
Whether seat seat pressed action since the last step.
Sourcepub fn is_released(&self, seat: usize, action: ActionId) -> bool
pub fn is_released(&self, seat: usize, action: ActionId) -> bool
Whether seat seat let go of action since the last step.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TickInput
impl<'de> Deserialize<'de> for TickInput
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
impl Eq for TickInput
impl StructuralPartialEq for TickInput
Auto Trait Implementations§
impl Freeze for TickInput
impl RefUnwindSafe for TickInput
impl Send for TickInput
impl Sync for TickInput
impl Unpin for TickInput
impl UnsafeUnpin for TickInput
impl UnwindSafe for TickInput
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