mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2025-01-04 07:25:44 +03:00
assure docs can be built without warnings by default.
It's a good way to review import paths and the public API.
This commit is contained in:
parent
3ef3dbc24f
commit
6fb6201ab9
@ -12,7 +12,7 @@ static mut GLOBAL_ASKPASS_BROKER: Option<AskpassBroker> = None;
|
||||
///
|
||||
/// # Safety
|
||||
/// This function **must** be called **at least once**, from only one thread at a time,
|
||||
/// before any other function from this module is called. **Calls to [`get`] before [`init`] will panic.**
|
||||
/// before any other function from this module is called. **Calls to [`get_broker`] before [`init`] will panic.**
|
||||
///
|
||||
/// This function is **NOT** thread safe.
|
||||
pub unsafe fn init(submit_prompt: impl Fn(PromptEvent<Context>) + Send + Sync + 'static) {
|
||||
|
@ -2,19 +2,16 @@
|
||||
//!
|
||||
//! ## How to use this
|
||||
//!
|
||||
//! Just make sure this [`Error`] type is used for each provided `tauri` command. The rest happens automatically
|
||||
//! such that:
|
||||
//! Just make sure this `Error` type is used for each provided `tauri` command. The rest happens automatically
|
||||
//! such that [context](gitbutler_error::error::Context) is handled correctly.
|
||||
//!
|
||||
//! * The frontend shows the root error as string by default…
|
||||
//! * …or it shows the provided [`Context`](gitbutler_core::error::Context) as controlled by the `core` crate.
|
||||
//!
|
||||
//! ### Interfacing with `tauri` using [`Error`]
|
||||
//! ### Interfacing with `tauri` using `Error`
|
||||
//!
|
||||
//! `tauri` serializes backend errors and makes these available as JSON objects to the frontend. The format
|
||||
//! is an implementation detail, but here it's implemented to turn each [`Error`] into a dict with `code`
|
||||
//! is an implementation detail, but here it's implemented to turn each `Error` into a dict with `code`
|
||||
//! and `messsage` fields.
|
||||
//!
|
||||
//! The values in these fields are controlled by attaching context, please [see the `core` docs](gitbutler_core::error))
|
||||
//! The values in these fields are controlled by attaching context, please [see the `error` docs](gitbutler_error::error))
|
||||
//! on how to do this.
|
||||
pub(crate) use frontend::Error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user