|
19 | 19 | #![warn(missing_docs, rust_2018_idioms)] |
20 | 20 | #![cfg_attr(doc_cfg, feature(doc_cfg))] |
21 | 21 |
|
| 22 | +#[cfg(target_os = "macos")] |
| 23 | +#[doc(hidden)] |
| 24 | +pub use embed_plist; |
22 | 25 | /// The Tauri error enum. |
23 | 26 | pub use error::Error; |
24 | 27 | pub use tauri_macros::{command, generate_handler}; |
@@ -60,7 +63,7 @@ use crate::{ |
60 | 63 | runtime::window::PendingWindow, |
61 | 64 | }; |
62 | 65 | use serde::Serialize; |
63 | | -use std::{collections::HashMap, sync::Arc}; |
| 66 | +use std::{collections::HashMap, fmt, sync::Arc}; |
64 | 67 |
|
65 | 68 | // Export types likely to be used by the application. |
66 | 69 | pub use runtime::menu::CustomMenuItem; |
@@ -146,13 +149,24 @@ macro_rules! tauri_build_context { |
146 | 149 | /// # Stability |
147 | 150 | /// This is the output of the `tauri::generate_context!` macro, and is not considered part of the stable API. |
148 | 151 | /// Unless you know what you are doing and are prepared for this type to have breaking changes, do not create it yourself. |
149 | | -#[derive(Debug)] |
150 | 152 | pub struct Context<A: Assets> { |
151 | 153 | pub(crate) config: Config, |
152 | 154 | pub(crate) assets: Arc<A>, |
153 | 155 | pub(crate) default_window_icon: Option<Vec<u8>>, |
154 | 156 | pub(crate) system_tray_icon: Option<Icon>, |
155 | 157 | pub(crate) package_info: crate::api::PackageInfo, |
| 158 | + pub(crate) _info_plist: (), |
| 159 | +} |
| 160 | + |
| 161 | +impl<A: Assets> fmt::Debug for Context<A> { |
| 162 | + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { |
| 163 | + f.debug_struct("Context") |
| 164 | + .field("config", &self.config) |
| 165 | + .field("default_window_icon", &self.default_window_icon) |
| 166 | + .field("system_tray_icon", &self.system_tray_icon) |
| 167 | + .field("package_info", &self.package_info) |
| 168 | + .finish() |
| 169 | + } |
156 | 170 | } |
157 | 171 |
|
158 | 172 | impl<A: Assets> Context<A> { |
@@ -224,13 +238,15 @@ impl<A: Assets> Context<A> { |
224 | 238 | default_window_icon: Option<Vec<u8>>, |
225 | 239 | system_tray_icon: Option<Icon>, |
226 | 240 | package_info: crate::api::PackageInfo, |
| 241 | + info_plist: (), |
227 | 242 | ) -> Self { |
228 | 243 | Self { |
229 | 244 | config, |
230 | 245 | assets, |
231 | 246 | default_window_icon, |
232 | 247 | system_tray_icon, |
233 | 248 | package_info, |
| 249 | + _info_plist: info_plist, |
234 | 250 | } |
235 | 251 | } |
236 | 252 | } |
|
0 commit comments