Skip to main content

replace_provider

Function replace_provider 

Source
pub fn replace_provider(provider: Arc<dyn FsProvider>) -> ProviderGuard
Expand description

Temporarily replace the active provider and return a guard that restores the previous provider when dropped. Useful for tests that need to install a mock filesystem without permanently mutating global state.