pub struct InputBuffer { /* private fields */ }Expand description
Ring buffer of recent inputs for combo detection.
Implementations§
Source§impl InputBuffer
impl InputBuffer
pub fn new(max_size: usize, buffer_window: f64) -> Self
pub fn update(&mut self, dt: f32)
pub fn push(&mut self, input: ComboInput)
pub fn consume_next_unconsumed(&mut self) -> Option<ComboInput>
pub fn peek_sequence(&self, len: usize) -> Vec<ComboInput>
pub fn clear(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for InputBuffer
impl Clone for InputBuffer
Source§fn clone(&self) -> InputBuffer
fn clone(&self) -> InputBuffer
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for InputBuffer
impl RefUnwindSafe for InputBuffer
impl Send for InputBuffer
impl Sync for InputBuffer
impl Unpin for InputBuffer
impl UnsafeUnpin for InputBuffer
impl UnwindSafe for InputBuffer
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