mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-02 07:56:20 +03:00
feat(docs): improve feature-specific API documentation (#2418)
This commit is contained in:
parent
6cd640fa0a
commit
b85775911d
@ -12,6 +12,7 @@ use std::path::{Path, PathBuf};
|
||||
mod codegen;
|
||||
|
||||
#[cfg(feature = "codegen")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "codegen")))]
|
||||
pub use codegen::context::CodegenContext;
|
||||
|
||||
/// Attributes used on Windows.
|
||||
|
@ -30,6 +30,7 @@ pub enum Error {
|
||||
Network(#[from] attohttpc::Error),
|
||||
/// The network error.
|
||||
#[cfg(feature = "reqwest-client")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "reqwest-client")))]
|
||||
#[error("Network Error: {0}")]
|
||||
Network(#[from] reqwest::Error),
|
||||
/// HTTP method error.
|
||||
@ -37,6 +38,7 @@ pub enum Error {
|
||||
HttpMethod(#[from] http::method::InvalidMethod),
|
||||
/// Invalid HTTP header value.
|
||||
#[cfg(feature = "reqwest-client")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "reqwest-client")))]
|
||||
#[error("{0}")]
|
||||
HttpHeaderValue(#[from] http::header::InvalidHeaderValue),
|
||||
/// Invalid HTTP header value.
|
||||
@ -75,6 +77,7 @@ pub enum Error {
|
||||
FailedToDetectPlatform(String),
|
||||
/// CLI argument parsing error.
|
||||
#[cfg(feature = "cli")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "cli")))]
|
||||
#[error("failed to parse CLI arguments: {0}")]
|
||||
ParseCliArguments(#[from] clap::Error),
|
||||
/// Shell error.
|
||||
|
@ -31,9 +31,11 @@ pub use tauri_utils::config;
|
||||
|
||||
/// The CLI args interface.
|
||||
#[cfg(feature = "cli")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "cli")))]
|
||||
pub mod cli;
|
||||
|
||||
#[cfg(feature = "cli")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "cli")))]
|
||||
pub use clap;
|
||||
|
||||
/// The desktop notifications API module.
|
||||
|
@ -1016,6 +1016,7 @@ fn on_event_loop_event<R: Runtime>(event: &RunEvent, manager: &WindowManager<R>)
|
||||
|
||||
/// Make `Wry` the default `Runtime` for `Builder`
|
||||
#[cfg(feature = "wry")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "wry")))]
|
||||
impl Default for Builder<crate::Wry> {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
|
@ -65,6 +65,7 @@ pub enum Error {
|
||||
Setup(Box<dyn std::error::Error + Send>),
|
||||
/// Tauri updater error.
|
||||
#[cfg(feature = "updater")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))]
|
||||
#[error("Updater: {0}")]
|
||||
TauriUpdater(#[from] crate::updater::Error),
|
||||
/// Error initializing plugin.
|
||||
|
@ -47,9 +47,11 @@ use tauri_runtime as runtime;
|
||||
pub mod settings;
|
||||
mod state;
|
||||
#[cfg(feature = "updater")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))]
|
||||
pub mod updater;
|
||||
|
||||
#[cfg(feature = "wry")]
|
||||
#[cfg_attr(doc_cfg, doc(cfg(feature = "wry")))]
|
||||
pub use tauri_runtime_wry::Wry;
|
||||
|
||||
/// `Result<T, ::tauri::Error>`
|
||||
|
Loading…
Reference in New Issue
Block a user