Enum viceroy_lib::error::Error[][src]

pub enum Error {
Show 28 variants BufferLengthError { buf: &'static str, len: &'static str, }, FatalError(String), FileFormat, FastlyConfig(FastlyConfigError), BackendUrl(Url), GuestError(GuestError), HandleError(HandleError), HyperError(Error), Infallible(Infallible), InvalidArgument, InvalidHeaderName(InvalidHeaderName), InvalidHeaderValue(InvalidHeaderValue), InvalidMethod(InvalidMethod), InvalidStatusCode(InvalidStatusCode), InvalidUri(InvalidUri), IoError(Error), Other(Error), Unsupported { msg: &'static str, }, DownstreamRespSending, StreamingChunkSend, UnknownBackend(String), UnknownDictionary(DictionaryName), UnknownDictionaryItem(String), UnknownDictionaryHandle(DictionaryHandle), Utf8Expected(Utf8Error), AbiVersionMismatch, DownstreamRequestError(DownstreamRequestError), NotAvailable(&'static str),
}

Variants

BufferLengthError

Thrown by hostcalls when a buffer is larger than its *_len limit.

Fields of BufferLengthError

buf: &'static strlen: &'static str
FatalError(String)

Error when viceroy has encountered a fatal error and the underlying wasmtime instance must be terminated with a Trap.

Tuple Fields of FatalError

0: String
FileFormat

Error when viceroy has been given an invalid file.

FastlyConfig(FastlyConfigError)

Tuple Fields of FastlyConfig

0: FastlyConfigError
BackendUrl(Url)

Tuple Fields of BackendUrl

0: Url
GuestError(GuestError)

An error from guest-provided arguments to a hostcall. These errors may be created automatically by the Wiggle-generated glue code that converts parameters from their ABI representation into richer Rust types, or by fallible methods of GuestPtr in the wiggle_abi trait implementations.

Tuple Fields of GuestError

0: GuestError
HandleError(HandleError)

Tuple Fields of HandleError

0: HandleError
HyperError(Error)

Tuple Fields of HyperError

0: Error
Infallible(Infallible)

Tuple Fields of Infallible

0: Infallible
InvalidArgument

Error when an invalid argument is supplied to a hostcall.

InvalidHeaderName(InvalidHeaderName)

Tuple Fields of InvalidHeaderName

0: InvalidHeaderName
InvalidHeaderValue(InvalidHeaderValue)

Tuple Fields of InvalidHeaderValue

0: InvalidHeaderValue
InvalidMethod(InvalidMethod)

Tuple Fields of InvalidMethod

0: InvalidMethod
InvalidStatusCode(InvalidStatusCode)

Tuple Fields of InvalidStatusCode

0: InvalidStatusCode
InvalidUri(InvalidUri)

Tuple Fields of InvalidUri

0: InvalidUri
IoError(Error)

Tuple Fields of IoError

0: Error
Other(Error)

Tuple Fields of Other

0: Error
Unsupported

Fields of Unsupported

msg: &'static str
DownstreamRespSending

Downstream response is already sending.

StreamingChunkSend
UnknownBackend(String)

Tuple Fields of UnknownBackend

0: String
UnknownDictionary(DictionaryName)

Tuple Fields of UnknownDictionary

0: DictionaryName
UnknownDictionaryItem(String)

Tuple Fields of UnknownDictionaryItem

0: String
UnknownDictionaryHandle(DictionaryHandle)

Tuple Fields of UnknownDictionaryHandle

0: DictionaryHandle
Utf8Expected(Utf8Error)

Tuple Fields of Utf8Expected

0: Utf8Error
AbiVersionMismatch
DownstreamRequestError(DownstreamRequestError)

Tuple Fields of DownstreamRequestError

0: DownstreamRequestError
NotAvailable(&'static str)

Tuple Fields of NotAvailable

0: &'static str

Implementations

Convert to an error code representation suitable for passing across the ABI boundary.

For more information about specific error codes see fastly_shared::FastlyStatus, as well as the witx interface definition located in wasm_abi/typenames.witx.

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.

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.

Query the “status” flags for the self file descriptor.

Create a new SetFdFlags value for use with set_fd_flags. Read more

Set the “status” flags for the self file descriptor. Read more

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.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

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.