diff --git a/core/tauri-macros/src/lib.rs b/core/tauri-macros/src/lib.rs index 5d57c034f..9781983d3 100644 --- a/core/tauri-macros/src/lib.rs +++ b/core/tauri-macros/src/lib.rs @@ -12,6 +12,12 @@ mod command; #[macro_use] mod context; +/// Mark a function as a command handler. It creates a wrapper function with the necessary glue code. +/// +/// # Stability +/// The output of this macro is managed internally by Tauri, +/// and should not be accessed directly on normal applications. +/// It may have breaking changes in the future. #[proc_macro_attribute] pub fn command(attributes: TokenStream, item: TokenStream) -> TokenStream { command::wrapper(attributes, item) @@ -23,6 +29,11 @@ pub fn generate_handler(item: TokenStream) -> TokenStream { } /// Reads a Tauri config file and generates a `::tauri::Context` based on the content. +/// +/// # Stability +/// The output of this macro is managed internally by Tauri, +/// and should not be accessed directly on normal applications. +/// It may have breaking changes in the future. #[proc_macro] pub fn generate_context(items: TokenStream) -> TokenStream { // this macro is exported from the context module diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 18f744264..e2ca22eed 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -123,6 +123,10 @@ macro_rules! tauri_build_context { } /// User supplied data required inside of a Tauri application. +/// +/// # Stability +/// This is the output of the `tauri::generate_context!` macro, and is not considered part of the stable API. +/// Unless you know what you are doing and are prepared for this type to have breaking changes, do not create it yourself. pub struct Context { /// The config the application was prepared with. pub config: Config, @@ -145,9 +149,8 @@ pub struct Context { pub package_info: crate::api::PackageInfo, } +// TODO: expand these docs /// Manages a running application. -/// -/// TODO: expand these docs pub trait Manager: sealed::ManagerBase

{ /// The [`Config`] the manager was created with. fn config(&self) -> Arc { diff --git a/core/tauri/src/updater/mod.rs b/core/tauri/src/updater/mod.rs index cdbadb851..95a52ed3d 100644 --- a/core/tauri/src/updater/mod.rs +++ b/core/tauri/src/updater/mod.rs @@ -3,9 +3,6 @@ // SPDX-License-Identifier: MIT //! # Tauri Updater -//! --- -//! > ⚠️ This project is a working project. Expect breaking changes. -//! --- //! //! The updater is focused on making Tauri's application updates **as safe and transparent as updates to a website**. //! @@ -101,7 +98,6 @@ //! Event : `tauri://update` //! //! ### Rust -//! todo: update this example to compile and run //! ```ignore //! dispatcher.emit("tauri://update", None); //! ``` @@ -124,7 +120,6 @@ //! ``` //! //! ### Rust -//! todo: update this example to compile and run //! ```ignore //! dispatcher.listen("tauri://update-available", move |msg| { //! println("New version available: {:?}", msg); @@ -146,7 +141,6 @@ //! Event : `tauri://update-install` //! //! ### Rust -//! todo: update this example to compile and run //! ```ignore //! dispatcher.emit("tauri://update-install", None); //! ``` @@ -172,7 +166,6 @@ //! ERROR is emitted when there is an error with the updater. We suggest to listen to this event even if the dialog is enabled. //! //! ### Rust -//! todo: update this example to compile and run //! ```ignore //! dispatcher.listen("tauri://update-status", move |msg| { //! println("New status: {:?}", msg); diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 01c776671..fda2978e6 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -91,12 +91,11 @@ impl Monitor { } } +// TODO: expand these docs since this is a pretty important type /// A webview window managed by Tauri. /// /// This type also implements [`Manager`] which allows you to manage other windows attached to /// the same application. -/// -/// TODO: expand these docs since this is a pretty important type pub struct Window { /// The webview window created by the runtime. window: DetachedWindow

,