Skip to main content

install_once

Function install_once 

Source
pub fn install_once(cx: &mut Cx, lib: &impl Lib) -> Result<bool>
Expand description

Install lib only if its id is not already registered. Returns true if it was loaded, false if it was already present. Replaces the registry().lib(&id).is_some() early-return guard.