Skip to main content

load

Function load 

pub fn load(
    document: &str,
    module: impl FnMut(&str) -> Result<Option<Vec<u8>>, BundleError>,
) -> Result<Theme, BundleError>
Expand description

The theme of the bundle whose document is document, taking each painter module it names from module (by set name). Each module is loaded and registered before the document is read.

ยงErrors

The bundle is not a theme (BundleError); sets loaded before the failure stay registered.