mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-06 11:10:10 +03:00
feat(core): add mutable config
getter on the Context
struct (#1803)
This commit is contained in:
parent
d36b726926
commit
144d6b9d4d
5
.changes/config-mut-getter.md
Normal file
5
.changes/config-mut-getter.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"tauri": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Adds a mutable `config` getter on the `Context` struct.
|
@ -142,6 +142,12 @@ impl<A: Assets> Context<A> {
|
|||||||
&self.config
|
&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.
|
/// The assets to be served directly by Tauri.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub fn assets(&self) -> Arc<A> {
|
pub fn assets(&self) -> Arc<A> {
|
||||||
|
Loading…
Reference in New Issue
Block a user