pub fn with_global_context<R>(
factory: impl FnOnce() -> Result<Box<dyn Platform + 'static>, PlatformError>,
f: impl FnOnce(&SlintContext) -> R,
) -> Result<R, PlatformError>
Expand description
Internal function to access the context. The factory function is called if the platform abstraction is not yet initialized, and should be given by the platform_selector