pub enum Error {
InvalidPath {
source: Utf8Error,
backtrace: Backtrace,
},
Spawn {
source: Error,
backtrace: Backtrace,
},
WriteRequest {
source: Error,
backtrace: Backtrace,
},
ReadResponse {
source: Error,
backtrace: Backtrace,
},
Protocol {
reason: String,
backtrace: Backtrace,
},
PluginError {
method: String,
message: String,
backtrace: Backtrace,
},
ArgumentType {
function: String,
backtrace: Backtrace,
},
FunctionNotFound {
function: String,
backtrace: Backtrace,
},
}Variants§
InvalidPath
The plugin path passed to Sandbox::load_module
was not valid UTF-8.
Spawn
Spawning the plugin subprocess failed (binary missing, no execute permission, etc.).
WriteRequest
Writing a request frame to the plugin’s stdin failed.
ReadResponse
Reading a response frame from the plugin’s stdout failed (EOF, truncated length header, etc.).
Protocol
A response frame was malformed JSON, or did not match the expected protocol shape.
PluginError
The plugin reported an error for the call.
ArgumentType
An argument value could not be marshaled to/from the protocol
(e.g. Value::Bytes on a path that only carries scalars).
FunctionNotFound
The requested function is not exported by the plugin.
Implementations§
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl ErrorCompat for Error
impl ErrorCompat for Error
§fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_>where
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl IntoError<Error> for InvalidPathSnafu
impl IntoError<Error> for InvalidPathSnafu
Source§impl IntoError<Error> for SpawnSnafu
impl IntoError<Error> for SpawnSnafu
Source§impl IntoError<Error> for WriteRequestSnafu
impl IntoError<Error> for WriteRequestSnafu
Source§impl IntoError<Error> for ReadResponseSnafu
impl IntoError<Error> for ReadResponseSnafu
Source§impl<__T0> IntoError<Error> for ProtocolSnafu<__T0>
impl<__T0> IntoError<Error> for ProtocolSnafu<__T0>
Source§impl<__T0, __T1> IntoError<Error> for PluginSnafu<__T0, __T1>
impl<__T0, __T1> IntoError<Error> for PluginSnafu<__T0, __T1>
Source§impl<__T0> IntoError<Error> for ArgumentTypeSnafu<__T0>
impl<__T0> IntoError<Error> for ArgumentTypeSnafu<__T0>
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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
Mutably borrows from an owned value. Read more