pub enum DispatchError {
LockRejected,
InvalidInterfacePath(String),
InvalidFunction(String),
MissingResponse,
RuntimeException(Error),
InvalidArgumentList,
UnsupportedType(String),
ResourceCreationError(ResourceCreationError),
ResourceReceiveError(ResourceReceiveError),
}Expand description
Errors that can occur when dispatching a function call to plugins.
Returned inside a cardinality wrapper from
Binding::dispatch
when a function call fails at runtime.
Variants§
LockRejected
Failed to acquire lock on plugin instance (another call is in progress).
InvalidInterfacePath(String)
The specified interface path doesn’t match any known interface.
InvalidFunction(String)
The specified function doesn’t exist on the interface.
MissingResponse
Function was expected to return a value but didn’t.
RuntimeException(Error)
The WASM function threw an exception during execution.
InvalidArgumentList
The provided arguments don’t match the function signature.
UnsupportedType(String)
Async types (Future, Stream, ErrorContext) are not yet supported for cross-plugin transfer.
ResourceCreationError(ResourceCreationError)
Failed to create a resource handle for cross-plugin transfer.
ResourceReceiveError(ResourceReceiveError)
Failed to receive a resource handle from another plugin.
Trait Implementations§
Source§impl Debug for DispatchError
impl Debug for DispatchError
Source§impl Display for DispatchError
impl Display for DispatchError
Source§impl Error for DispatchError
impl Error for DispatchError
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 From<DispatchError> for Val
impl From<DispatchError> for Val
Source§fn from(error: DispatchError) -> Val
fn from(error: DispatchError) -> Val
Converts to this type from the input type.
Source§impl From<ResourceCreationError> for DispatchError
impl From<ResourceCreationError> for DispatchError
Source§fn from(source: ResourceCreationError) -> Self
fn from(source: ResourceCreationError) -> Self
Converts to this type from the input type.
Source§impl From<ResourceReceiveError> for DispatchError
impl From<ResourceReceiveError> for DispatchError
Source§fn from(source: ResourceReceiveError) -> Self
fn from(source: ResourceReceiveError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DispatchError
impl RefUnwindSafe for DispatchError
impl Send for DispatchError
impl Sync for DispatchError
impl Unpin for DispatchError
impl UnsafeUnpin for DispatchError
impl UnwindSafe for DispatchError
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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