pub enum LoadError<I: InterfaceData, P: PluginData> {
InvalidSocket(I::Id),
LoopDetected(I::Id),
FailedCardinalityRequirements(InterfaceCardinality, usize),
CorruptedInterfaceManifest(I::Error),
CorruptedPluginManifest(P::Error),
FailedToLoadComponent(Error),
FailedToReadWasm(Error),
FailedToLinkInterface(Error),
FailedToLink(String, Error),
AlreadyHandled,
}Expand description
Errors that can occur while loading and linking plugins.
Loading attempts to proceed gracefully, collecting errors and loading as many
plugins as possible while adhering to cardinality constraints. These errors
are returned via PartialResult from PluginTree::load.
Variants§
InvalidSocket(I::Id)
A plugin references a socket (dependency) that doesn’t exist in the interface set.
LoopDetected(I::Id)
A dependency cycle was detected. Cycles are forbidden in the plugin graph.
FailedCardinalityRequirements(InterfaceCardinality, usize)
The number of plugins implementing an interface violates its cardinality.
For example, ExactlyOne with 0 or 2+ plugins, or AtLeastOne with 0 plugins.
CorruptedInterfaceManifest(I::Error)
Failed to read interface metadata (e.g., couldn’t parse WIT or access data source).
CorruptedPluginManifest(P::Error)
Failed to read plugin metadata (e.g., couldn’t determine sockets or ID).
FailedToLoadComponent(Error)
Wasmtime failed to compile the WASM component (invalid binary or unsupported features).
FailedToReadWasm(Error)
I/O error reading the WASM binary.
FailedToLinkInterface(Error)
Failed to link the root interface into the plugin.
FailedToLink(String, Error)
Failed to link a specific function during socket wiring.
AlreadyHandled
Internal marker for errors that have already been reported.
Trait Implementations§
Source§impl<I: InterfaceData, P: PluginData> Debug for LoadError<I, P>
impl<I: InterfaceData, P: PluginData> Debug for LoadError<I, P>
Source§impl<I: InterfaceData, P: PluginData> Display for LoadError<I, P>
impl<I: InterfaceData, P: PluginData> Display for LoadError<I, P>
Source§impl<I: InterfaceData, P: PluginData> Error for LoadError<I, P>
impl<I: InterfaceData, P: PluginData> Error for LoadError<I, P>
1.30.0 · 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
Auto Trait Implementations§
impl<I, P> Freeze for LoadError<I, P>where
<I as InterfaceData>::Id: Freeze,
<I as InterfaceData>::Error: Freeze,
<P as PluginData>::Error: Freeze,
impl<I, P> !RefUnwindSafe for LoadError<I, P>
impl<I, P> Send for LoadError<I, P>where
<I as InterfaceData>::Id: Send,
<I as InterfaceData>::Error: Send,
<P as PluginData>::Error: Send,
impl<I, P> Sync for LoadError<I, P>where
<I as InterfaceData>::Id: Sync,
<I as InterfaceData>::Error: Sync,
<P as PluginData>::Error: Sync,
impl<I, P> Unpin for LoadError<I, P>where
<I as InterfaceData>::Id: Unpin,
<I as InterfaceData>::Error: Unpin,
<P as PluginData>::Error: Unpin,
impl<I, P> !UnwindSafe for LoadError<I, P>
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> 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 moreSource§impl<X> Pipe for X
impl<X> Pipe for X
Source§fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Returnwhere
Function: FnOnce(&'a Self) -> Return,
Source§fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Returnwhere
Function: FnOnce(&'a mut Self) -> Return,
Source§fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait AsRef<Param>. Read moreSource§fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
f to &mut self where f takes a single parameter of type Param
and Self implements trait AsMut<Param>. Read moreSource§fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait Deref<Target = Param>. Read moreSource§fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
fn pipe_deref_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Returnwhere
Self: DerefMut<Target = Param>,
Param: 'a + ?Sized,
Function: FnOnce(&'a mut Param) -> Return,
f to &mut self where f takes a single parameter of type Param
and Self implements trait DerefMut<Target = Param>. Read moreSource§fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
f to &self where f takes a single parameter of type Param
and Self implements trait Borrow<Param>. Read moreSource§fn pipe_borrow_mut<'a, Param, Return, Function>(
&'a mut self,
f: Function,
) -> Return
fn pipe_borrow_mut<'a, Param, Return, Function>( &'a mut self, f: Function, ) -> Return
f to &mut self where f takes a single parameter of type Param
and Self implements trait BorrowMut<Param>. Read more