diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index dcb965cdaed5..97652556f28c 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -1214,6 +1214,7 @@ impl Builder { /// [`State`](crate::State) guard. In particular, if a value of type `T` /// is managed by Tauri, adding `State` to the list of arguments in a /// command handler instructs Tauri to retrieve the managed value. + /// Additionally, [`state`](crate::Manager#method.state) can be used to retrieve the value manually. /// /// # Panics /// diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 32c86cc9237e..7be4034ca2d6 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -756,18 +756,13 @@ pub trait Manager: sealed::ManagerBase { /// Add `state` to the state managed by the application. /// - /// This method can be called any number of times as long as each call - /// refers to a different `T`. - /// If a state for `T` is already managed, the function returns false and the value is ignored. + /// If the state for the `T` type has previously been set, the state is unchanged and false is returned. Otherwise true is returned. /// /// Managed state can be retrieved by any command handler via the /// [`State`](crate::State) guard. In particular, if a value of type `T` /// is managed by Tauri, adding `State` to the list of arguments in a /// command handler instructs Tauri to retrieve the managed value. - /// - /// # Panics - /// - /// Panics if state of type `T` is already being managed. + /// Additionally, [`state`](Self#method.state) can be used to retrieve the value manually. /// /// # Mutability ///