Enum Error

Source
#[non_exhaustive]
pub enum Error {
Show 38 variants Runtime(Error), WindowLabelAlreadyExists(String), WebviewLabelAlreadyExists(String), CannotReparentWebviewWindow, AssetNotFound(String), Json(Error), Io(Error), InvalidIcon(Error), InvalidArgs(&'static str, &'static str, Error), Setup(SetupError), PluginInitialization(String, String), InvalidUrl(ParseError), JoinError(JoinError), InvalidWebviewUrl(&'static str), GlobPattern(PatternError), Image(ImageError), InvalidWindowHandle, FailedToReceiveMessage, Menu(Error), BadMenuIcon(BadIcon), Tray(Error), BadTrayIcon(BadIcon), NoParent, NoExtension, NoBasename, CurrentDir(Error), UnknownPath, WindowNotFound, BadResourceId(ResourceId), Anyhow(Error), WebviewNotFound, UnstableFeatureNotSupported, CannotDeserializeScope(Box<dyn Error + Send + Sync>), RawHandleError(HandleError), Csprng(Error), InvokeKey, IllegalEventName(String), TokioOneshotRecv(RecvError),
}
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.

§

WindowLabelAlreadyExists(String)

Window label must be unique.

§

WebviewLabelAlreadyExists(String)

Webview label must be unique.

§

CannotReparentWebviewWindow

Cannot use the webview reparent function on webview windows.

§

AssetNotFound(String)

Embedded asset not found.

§

Json(Error)

Failed to serialize/deserialize.

§

Io(Error)

IO error.

§

InvalidIcon(Error)

Failed to load window icon.

§

InvalidArgs(&'static str, &'static str, Error)

Invalid args when running a command.

§

Setup(SetupError)

Encountered an error in the setup hook,

§

PluginInitialization(String, String)

Error initializing plugin.

§

InvalidUrl(ParseError)

A part of the URL is malformed or invalid. This may occur when parsing and combining user-provided URLs and paths.

§

JoinError(JoinError)

Task join error.

§

InvalidWebviewUrl(&'static str)

An invalid window URL was provided. Includes details about the error.

§

GlobPattern(PatternError)

Invalid glob pattern.

§

Image(ImageError)

Image error.

§

InvalidWindowHandle

The Window’s raw handle is invalid for the platform.

§

FailedToReceiveMessage

Failed to receive message .

§

Menu(Error)

Menu error.

§

BadMenuIcon(BadIcon)

Bad menu icon error.

§

Tray(Error)

Available on desktop and crate feature tray-icon only.

Tray icon error.

§

BadTrayIcon(BadIcon)

Available on desktop and crate feature tray-icon only.

Bad tray icon error.

§

NoParent

Path does not have a parent.

§

NoExtension

Path does not have an extension.

§

NoBasename

Path does not have a basename.

§

CurrentDir(Error)

Cannot resolve current directory.

§

UnknownPath

Unknown path.

§

WindowNotFound

window not found.

§

BadResourceId(ResourceId)

The resource id is invalid.

§

Anyhow(Error)

The anyhow crate error.

§

WebviewNotFound

webview not found.

§

UnstableFeatureNotSupported

API requires the unstable feature flag.

§

CannotDeserializeScope(Box<dyn Error + Send + Sync>)

Failed to deserialize scope object.

§

RawHandleError(HandleError)

Failed to get a raw handle.

§

Csprng(Error)

Something went wrong with the CSPRNG.

§

InvokeKey

Bad __TAURI_INVOKE_KEY__ value received in ipc message.

§

IllegalEventName(String)

Illegal event name.

§

TokioOneshotRecv(RecvError)

tokio oneshot channel failed to receive message

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<BadIcon> for Error

Source§

fn from(source: BadIcon) -> Self

Converts to this type from the input type.
Source§

impl From<BadIcon> for Error

Source§

fn from(source: BadIcon) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(value: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for InvokeError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<HandleError> for Error

Source§

fn from(source: HandleError) -> Self

Converts to this type from the input type.
Source§

impl From<ImageError> for Error

Source§

fn from(source: ImageError) -> Self

Converts to this type from the input type.
Source§

impl From<JoinError> for Error

Source§

fn from(source: JoinError) -> Self

Converts to this type from the input type.
Source§

impl From<PatternError> for Error

Source§

fn from(source: PatternError) -> Self

Converts to this type from the input type.
Source§

impl From<RecvError> for Error

Source§

fn from(source: RecvError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T