Skip to main content

LoadError

Enum LoadError 

Source
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.

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>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I: InterfaceData, P: PluginData> Display for LoadError<I, P>

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I: InterfaceData, P: PluginData> Error for LoadError<I, P>
where Self: Debug + Display,

1.30.0 · Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<X> Pipe for X

Source§

fn pipe<Return, Function>(self, f: Function) -> Return
where Self: Sized, Function: FnOnce(Self) -> Return,

Apply f to self. Read more
Source§

fn pipe_ref<'a, Return, Function>(&'a self, f: Function) -> Return
where Function: FnOnce(&'a Self) -> Return,

Apply f to &self. Read more
Source§

fn pipe_mut<'a, Return, Function>(&'a mut self, f: Function) -> Return
where Function: FnOnce(&'a mut Self) -> Return,

Apply f to &mut self. Read more
Source§

fn pipe_as_ref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
where Self: AsRef<Param>, Param: 'a + ?Sized, Function: FnOnce(&'a Param) -> Return,

Apply f to &self where f takes a single parameter of type Param and Self implements trait AsRef<Param>. Read more
Source§

fn pipe_as_mut<'a, Param, Return, Function>(&'a mut self, f: Function) -> Return
where Self: AsMut<Param>, Param: 'a + ?Sized, Function: FnOnce(&'a mut Param) -> Return,

Apply f to &mut self where f takes a single parameter of type Param and Self implements trait AsMut<Param>. Read more
Source§

fn pipe_deref<'a, Param, Return, Function>(&'a self, f: Function) -> Return
where Self: Deref<Target = Param>, Param: 'a + ?Sized, Function: FnOnce(&'a Param) -> Return,

Apply f to &self where f takes a single parameter of type Param and Self implements trait Deref<Target = Param>. Read more
Source§

fn pipe_deref_mut<'a, Param, Return, Function>( &'a mut self, f: Function, ) -> Return
where Self: DerefMut<Target = Param>, Param: 'a + ?Sized, Function: FnOnce(&'a mut Param) -> Return,

Apply f to &mut self where f takes a single parameter of type Param and Self implements trait DerefMut<Target = Param>. Read more
Source§

fn pipe_borrow<'a, Param, Return, Function>(&'a self, f: Function) -> Return
where Self: Borrow<Param>, Param: 'a + ?Sized, Function: FnOnce(&'a Param) -> Return,

Apply f to &self where f takes a single parameter of type Param and Self implements trait Borrow<Param>. Read more
Source§

fn pipe_borrow_mut<'a, Param, Return, Function>( &'a mut self, f: Function, ) -> Return
where Self: BorrowMut<Param>, Param: 'a + ?Sized, Function: FnOnce(&'a mut Param) -> Return,

Apply f to &mut self where f takes a single parameter of type Param and Self implements trait BorrowMut<Param>. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.