Skip to main content

assert_input_contract

Function assert_input_contract 

Source
pub fn assert_input_contract<B: Input, F: FnMut() -> B>(make: F)
Available on crate feature testing only.
Expand description

Drives B through Input’s coalescing obligation.

A burst of consecutive Event::Mouse(MouseEventKind::Moved) pushes must collapse to the latest one, matching coalesces_with.

§Panics

Panics if the burst does not coalesce to exactly one event, or if that event isn’t the last one pushed.