Skip to main content

HmrSink

Type Alias HmrSink 

Source
pub type HmrSink = Box<dyn Fn(&str) -> Result<(), ()> + Send + Sync>;
Expand description

Per-tab callback that emits one HMR frame.

The broadcaster keeps a vector of these and invokes each on every broadcast(). Callbacks return Ok(()) on a successful WebSocket send and Err(()) to be evicted (closed socket, write error).

Aliased Typeยง

pub struct HmrSink(/* private fields */);