Enum viceroy_lib::error::Error
source · pub enum Error {
Show 39 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),
Other(Error),
Unsupported {
msg: &'static str,
},
DownstreamRespSending,
StreamingChunkSend,
UnknownBackend(String),
DictionaryError(DictionaryError),
GeolocationError(GeolocationError),
ObjectStoreError(ObjectStoreError),
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),
}
Variants§
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)
Other(Error)
Unsupported
DownstreamRespSending
Downstream response is already sending.
StreamingChunkSend
UnknownBackend(String)
DictionaryError(DictionaryError)
GeolocationError(GeolocationError)
ObjectStoreError(ObjectStoreError)
SecretStoreError(SecretStoreError)
Utf8Expected(Utf8Error)
AbiVersionMismatch
DownstreamRequestError(DownstreamRequestError)
NotAvailable(&'static str)
BadCerts(Error)
BackendNameRegistryError(String)
HttpError(Error)
UnknownObjectStore(String)
ObjectStoreKeyValidationError(KeyValidationError)
UnfinishedStreamingBody
ValueAbsent
ToStr(ToStrError)
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<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<ToStrError> for Error
impl From<ToStrError> for Error
source§fn from(source: ToStrError) -> Self
fn from(source: ToStrError) -> Self
Auto Trait Implementations§
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
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§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.