#[non_exhaustive]pub enum Error {
Show 46 variants
BufferLengthError {
buf: &'static str,
len: &'static str,
},
FatalError(String),
FileFormat,
ProfilingStrategy,
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),
LimitExceeded {
msg: &'static str,
},
MissingDownstreamMetadata,
Other(Error),
Unsupported {
msg: &'static str,
},
DownstreamRespSending,
StreamingChunkSend,
UnknownBackend(String),
DictionaryError(DictionaryError),
DeviceDetectionError(DeviceDetectionError),
ObjectStoreError(ObjectStoreError),
KvStoreError(KvStoreError),
SecretStoreError(SecretStoreError),
Utf8Expected(Utf8Error),
AbiVersionMismatch,
DownstreamRequestError(DownstreamRequestError),
NotAvailable(&'static str),
BadCerts(Error),
BackendNameRegistryError(String),
HttpError(Error),
UnknownObjectStore(String),
ObjectStoreKeyValidationError(KeyValidationError),
UnfinishedStreamingBody,
SharedMemory,
ValueAbsent,
ToStr(ToStrError),
InvalidClientCert(ClientCertError),
InvalidAlpnRepsonse(&'static str, String),
Again,
CacheError(Error),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
BufferLengthError
Thrown by hostcalls when a buffer is larger than its *_len limit.
FatalError(String)
Error when viceroy has encountered a fatal error and the underlying wasmtime instance must be terminated with a Trap.
FileFormat
Error when viceroy has been given an invalid file.
ProfilingStrategy
FastlyConfig(FastlyConfigError)
BackendUrl(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.
HandleError(HandleError)
HyperError(Error)
Infallible(Infallible)
InvalidArgument
Error when an invalid argument is supplied to a hostcall.
InvalidHeaderName(InvalidHeaderName)
InvalidHeaderValue(InvalidHeaderValue)
InvalidMethod(InvalidMethod)
InvalidStatusCode(InvalidStatusCode)
InvalidUri(InvalidUri)
IoError(Error)
LimitExceeded
MissingDownstreamMetadata
Other(Error)
Unsupported
DownstreamRespSending
Downstream response is already sending.
StreamingChunkSend
UnknownBackend(String)
DictionaryError(DictionaryError)
DeviceDetectionError(DeviceDetectionError)
ObjectStoreError(ObjectStoreError)
KvStoreError(KvStoreError)
SecretStoreError(SecretStoreError)
Utf8Expected(Utf8Error)
AbiVersionMismatch
DownstreamRequestError(DownstreamRequestError)
NotAvailable(&'static str)
BadCerts(Error)
BackendNameRegistryError(String)
HttpError(Error)
UnknownObjectStore(String)
ObjectStoreKeyValidationError(KeyValidationError)
UnfinishedStreamingBody
ValueAbsent
ToStr(ToStrError)
InvalidClientCert(ClientCertError)
InvalidAlpnRepsonse(&'static str, String)
Again
CacheError(Error)
Implementations§
Source§impl Error
impl Error
Sourcepub fn to_fastly_status(&self) -> FastlyStatus
pub fn to_fastly_status(&self) -> FastlyStatus
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§
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
Source§impl From<ClientCertError> for Error
impl From<ClientCertError> for Error
Source§fn from(source: ClientCertError) -> Self
fn from(source: ClientCertError) -> Self
Source§impl From<DeviceDetectionError> for Error
impl From<DeviceDetectionError> for Error
Source§fn from(source: DeviceDetectionError) -> Self
fn from(source: DeviceDetectionError) -> Self
Source§impl From<DictionaryError> for Error
impl From<DictionaryError> for Error
Source§fn from(source: DictionaryError) -> Self
fn from(source: DictionaryError) -> Self
Source§impl From<DownstreamRequestError> for Error
impl From<DownstreamRequestError> for Error
Source§fn from(source: DownstreamRequestError) -> Self
fn from(source: DownstreamRequestError) -> Self
Source§impl From<FastlyConfigError> for Error
impl From<FastlyConfigError> for Error
Source§fn from(source: FastlyConfigError) -> Self
fn from(source: FastlyConfigError) -> Self
Source§impl From<GuestError> for Error
impl From<GuestError> for Error
Source§fn from(source: GuestError) -> Self
fn from(source: GuestError) -> Self
Source§impl From<HandleError> for Error
impl From<HandleError> for Error
Source§fn from(source: HandleError) -> Self
fn from(source: HandleError) -> Self
Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(source: Infallible) -> Self
fn from(source: Infallible) -> 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<InvalidStatusCode> for Error
impl From<InvalidStatusCode> for Error
Source§fn from(source: InvalidStatusCode) -> Self
fn from(source: InvalidStatusCode) -> Self
Source§impl From<InvalidUri> for Error
impl From<InvalidUri> for Error
Source§fn from(source: InvalidUri) -> Self
fn from(source: InvalidUri) -> Self
Source§impl From<SecretStoreError> for Error
impl From<SecretStoreError> for Error
Source§fn from(source: SecretStoreError) -> Self
fn from(source: SecretStoreError) -> Self
Source§impl From<ToStrError> for Error
impl From<ToStrError> for Error
Source§fn from(source: ToStrError) -> Self
fn from(source: ToStrError) -> Self
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> 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
Source§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self file descriptor. Read moreSource§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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more