Function i_slint_core::context::with_platform

source ยท
pub fn with_platform<R>(
    factory: impl FnOnce() -> Result<Box<dyn Platform + 'static>, PlatformError>,
    f: impl FnOnce(&dyn Platform) -> Result<R, PlatformError>
) -> Result<R, PlatformError>
Expand description

Internal function to access the platform abstraction. The factory function is called if the platform abstraction is not yet initialized, and should be given by the platform_selector