feat(core): add mutable config getter on the Context struct (#1803)

This commit is contained in:
Lucas Fernandes Nogueira 2021-05-12 11:17:52 -03:00 committed by GitHub
parent d36b726926
commit 144d6b9d4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"tauri": patch
---
Adds a mutable `config` getter on the `Context` struct.

View File

@ -142,6 +142,12 @@ impl<A: Assets> Context<A> {
&self.config
}
/// A mutable reference to the config the application was prepared with.
#[inline(always)]
pub fn config_mut(&mut self) -> &mut Config {
&mut self.config
}
/// The assets to be served directly by Tauri.
#[inline(always)]
pub fn assets(&self) -> Arc<A> {