pub fn init<R: Runtime>(bundle: impl Into<Option<Bundle>>) -> TauriPlugin<R>Expand description
The plugin, serving bundle on the scheme its manifest names (compmd), with the origin given to the app’s pages
and the pack store in the app’s data folder.
§Panics
When the bundle’s scheme isn’t a scheme’s name, or it was built without one (source): mistakes in the app’s
build, which build::bundle refuses already.
§Example
let bundle = Bundle::from_files([(
"manifest.json",
br#"{"format": 1, "frames": {"hash": "1df336e75685de8c"}, "source": "compmd://localhost/"}"#.to_vec(),
)])?;
let app = tauri::Builder::<tauri::Wry>::default().plugin(tauri_plugin_compmd::init(bundle));