Error

Enum Error 

Source
pub enum Error<'a> {
    InvalidOuterAlias(InnerizeError),
    IllFormedOuterAlias(Error<'a>),
    ResourceInDeclarator,
    HandleToNonResource,
    ValTypeRefToNonVal(Defined<'a>),
    ClosingError(ClosingError),
    IllFormed(Error<'a>),
}
Expand description

Elaboration-specific errors

Variants§

§

InvalidOuterAlias(InnerizeError)

Innerizing an outer alias failed; this usually means that the outer alias refers to a resource type or something like that.

§

IllFormedOuterAlias(Error<'a>)

Innerizing an outer alias resulted in an ill-formed type; this often also means that the outer alias refers to a resource type or similar.

§

ResourceInDeclarator

The component type declarator should never have a resource type in it, even though this is allowed by the grammar, since there is no export (or instantiation) to generatively give it identity.

§

HandleToNonResource

A the typeidx inside an own/borrow handle should always point to a resource type (either a bare resource, or, more usually, an imported/exported type variable that is bounded by (sub resource).

§

ValTypeRefToNonVal(Defined<'a>)

Complex valtypes are allowed to use indirect type indices to refer to another type, but the type index space is also used for instance types, bare resource types, etc. A malformed complex value type which refers to a non-value type will result in this error.

§

ClosingError(ClosingError)

The finalisation/closing of a component or instance type failed. This usually means that an exported type is referring to a non-exported type variable or something along those lines, which makes it impossible for the exported type to be lifted out of the context.

§

IllFormed(Error<'a>)

A finished component or instance type was ill-formed

Trait Implementations§

Source§

impl<'a> Debug for Error<'a>

Source§

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

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

impl<'a> From<ClosingError> for Error<'a>

Source§

fn from(e: ClosingError) -> Error<'a>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> Freeze for Error<'a>

§

impl<'a> RefUnwindSafe for Error<'a>

§

impl<'a> Send for Error<'a>

§

impl<'a> Sync for Error<'a>

§

impl<'a> Unpin for Error<'a>

§

impl<'a> UnwindSafe for Error<'a>

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