Skip to main content

EventListenerVec

Type Alias EventListenerVec 

Source
pub type EventListenerVec = SmallVec<[(Rc<RefCell<EventCallback>>, EventCallbackConfig); 1]>;
Expand description

Vector of event listeners, optimized for the common case of 0-1 listeners per event type. Uses SmallVec to avoid heap allocation when there’s only one listener. Inspired by Chromium’s HeapVector<…, 1> pattern for event listener storage.

Aliased Type§

pub struct EventListenerVec { /* private fields */ }