chore: breaking change notice (#1772)

This commit is contained in:
Lucas Fernandes Nogueira
2021-05-11 01:02:19 -03:00
committed by GitHub
parent 21ce355c48
commit 1df16b7011
4 changed files with 17 additions and 11 deletions

View File

@@ -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

View File

@@ -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<A: Assets> {
/// The config the application was prepared with.
pub config: Config,
@@ -145,9 +149,8 @@ pub struct Context<A: Assets> {
pub package_info: crate::api::PackageInfo,
}
// TODO: expand these docs
/// Manages a running application.
///
/// TODO: expand these docs
pub trait Manager<P: Params>: sealed::ManagerBase<P> {
/// The [`Config`] the manager was created with.
fn config(&self) -> Arc<Config> {

View File

@@ -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);

View File

@@ -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<P: Params> {
/// The webview window created by the runtime.
window: DetachedWindow<P>,