Skip to content

Commit 144d6b9

Browse files
authored
feat(core): add mutable config getter on the Context struct (#1803)
1 parent d36b726 commit 144d6b9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.changes/config-mut-getter.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Adds a mutable `config` getter on the `Context` struct.

core/tauri/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ impl<A: Assets> Context<A> {
142142
&self.config
143143
}
144144

145+
/// A mutable reference to the config the application was prepared with.
146+
#[inline(always)]
147+
pub fn config_mut(&mut self) -> &mut Config {
148+
&mut self.config
149+
}
150+
145151
/// The assets to be served directly by Tauri.
146152
#[inline(always)]
147153
pub fn assets(&self) -> Arc<A> {

0 commit comments

Comments
 (0)