Enum tauri::Error[][src]

#[non_exhaustive]
pub enum Error {
Show variants Runtime(Error), CreateWebview(Box<dyn Error + Send>), CreateWindow, WebviewNotFound, FailedToSendMessage, AssetNotFound(String), Json(Error), UnknownApi(Option<Error>), FailedToExecuteApi(Error), Io(Error), Base64Decode(DecodeError), InvalidIcon(Box<dyn Error + Send>), HttpClientNotInitialized, ApiNotEnabled(String), ApiNotAllowlisted(String), InvalidArgs(&'static strError), Setup(Box<dyn Error + Send>), TauriUpdater(Error), PluginInitialization(StringString), DialogDefaultPathNotExists(PathBuf), SystemTray(Box<dyn Error + Send>),
}
Expand description

Runtime errors that can happen inside a Tauri application.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Runtime(Error)

Runtime error.

CreateWebview(Box<dyn Error + Send>)

Failed to create webview.

CreateWindow

Failed to create window.

WebviewNotFound

Can’t access webview dispatcher because the webview was closed or not found.

FailedToSendMessage

Failed to send message to webview.

AssetNotFound(String)

Embedded asset not found.

Json(Error)

Failed to serialize/deserialize.

UnknownApi(Option<Error>)

Unknown API type.

FailedToExecuteApi(Error)

Failed to execute tauri API.

Io(Error)

IO error.

Base64Decode(DecodeError)

Failed to decode base64.

InvalidIcon(Box<dyn Error + Send>)

Failed to load window icon.

HttpClientNotInitialized

Client with specified ID not found.

ApiNotEnabled(String)

API not enabled by Tauri.

ApiNotAllowlisted(String)

API not whitelisted on tauri.conf.json

InvalidArgs(&'static strError)

Invalid args when running a command.

Setup(Box<dyn Error + Send>)

Encountered an error in the setup hook,

TauriUpdater(Error)

Tauri updater error.

PluginInitialization(StringString)

Error initializing plugin.

DialogDefaultPathNotExists(PathBuf)

default_path provided to dialog API doesn’t exist.

SystemTray(Box<dyn Error + Send>)

Encountered an error creating the app system tray,

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Turn any Tag into the JavaScript representation of a string.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.