Skip to main content

static_read

Function static_read 

Source
pub fn static_read<A: IVm>(
    runtime: &Any<A>,
    path: &str,
) -> Result<Any<A>, Any<A>>
Expand description

A static function read from the runtime value by its id, Object.is: what a compiled module’s read of a static spells, static_read(&runtime, "Object.is")? — the value’s static function, called with the id — the one closure the runtime holds for it, so two reads are one function, as Object.is === Object.is is in JavaScript. An id the runtime answers no function for is refused ([error::no_static_function]): the parser admitted the id, so the runtime’s table is incomplete, and undefined would be a plausible wrong answer. A throw of static itself is the read’s.