pub struct InputTickState {
pub actions: Vec<(String, ActionValue)>,
}Expand description
The input state for one server tick.
The client builds one per tick with InputTickState::capture, sends it to
the server, which applies it before running the tick.
Fields§
§actions: Vec<(String, ActionValue)>Active actions and their values at this tick.
Implementations§
Source§impl InputTickState
impl InputTickState
Sourcepub fn capture(map: &ActionMap) -> Self
pub fn capture(map: &ActionMap) -> Self
Capture the current state of every declared action from map.
This snapshots enabled and disabled actions alike; disabled actions will be in their idle state, and so are the actions of a context that is not on the stack. An action whose input a context above it consumed is captured as that input left it — which is exactly what the active contexts let through, and all the simulation should see.
Sourcepub fn get(&self, name: &str) -> Option<&ActionValue>
pub fn get(&self, name: &str) -> Option<&ActionValue>
Look up an action value by name.
Trait Implementations§
Source§impl Clone for InputTickState
impl Clone for InputTickState
Source§impl Debug for InputTickState
impl Debug for InputTickState
Auto Trait Implementations§
impl Freeze for InputTickState
impl RefUnwindSafe for InputTickState
impl Send for InputTickState
impl Sync for InputTickState
impl Unpin for InputTickState
impl UnsafeUnpin for InputTickState
impl UnwindSafe for InputTickState
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