pub enum Error {
Show 17 variants
Json(Error),
Io(Error),
Network(Error),
Http(Error),
HttpInvalidHeaderName(InvalidHeaderName),
HttpInvalidHeaderValue(InvalidHeaderValue),
UrlNotAllowed(Url),
UrlParseError(ParseError),
HttpMethod(InvalidMethod),
SchemeNotSupport(String),
RequestCanceled,
FsError(Error),
DataUrlError,
DataUrlDecodeError,
Tauri(Error),
Utf8(FromUtf8Error),
DangerousSettings,
}Expand description
Errors that can happen while using the HTTP plugin.
The error is serialized to the frontend as its Display string.
Variants§
Json(Error)
JSON serialization or deserialization error.
Io(Error)
File system error, raised for instance when the cookie store file cannot be created or opened on startup.
Network(Error)
Error from the underlying reqwest client, raised while building the client, sending the
request or reading the response body.
Http(Error)
Error from the http crate, raised while building the response of a data: URL.
HttpInvalidHeaderName(InvalidHeaderName)
A header name given by the frontend is not a valid HTTP header name.
HttpInvalidHeaderValue(InvalidHeaderValue)
A header value is not a valid HTTP header value.
UrlNotAllowed(Url)
URL not allowed by the scope.
Raised for the URL requested by the frontend, and - when the
scope_redirects configuration is enabled - for any
redirect target that is not allowed by the scope.
UrlParseError(ParseError)
Failed to parse a URL.
HttpMethod(InvalidMethod)
HTTP method error.
SchemeNotSupport(String)
The requested URL uses an unsupported scheme. Only http, https and data are handled.
RequestCanceled
The request was aborted by the frontend before the response was received.
FsError(Error)
Error from the file system plugin.
DataUrlError
The data: URL could not be processed.
DataUrlDecodeError
The body of the data: URL could not be decoded into bytes.
Tauri(Error)
Error from the Tauri APIs, raised for instance while resolving a path or while reading the webview resource table.
Utf8(FromUtf8Error)
A response header value is not valid UTF-8, so it cannot be forwarded to the frontend.
DangerousSettings
The frontend requested dangerous client settings, but the dangerous-settings Cargo
feature is not enabled.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Source§impl From<InvalidHeaderName> for Error
impl From<InvalidHeaderName> for Error
Source§fn from(source: InvalidHeaderName) -> Self
fn from(source: InvalidHeaderName) -> Self
Source§impl From<InvalidHeaderValue> for Error
impl From<InvalidHeaderValue> for Error
Source§fn from(source: InvalidHeaderValue) -> Self
fn from(source: InvalidHeaderValue) -> Self
Source§impl From<InvalidMethod> for Error
impl From<InvalidMethod> for Error
Source§fn from(source: InvalidMethod) -> Self
fn from(source: InvalidMethod) -> Self
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IpcResponse for Twhere
T: Serialize,
impl<T> IpcResponse for Twhere
T: Serialize,
impl<T> MaybeSendSync for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.