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> From<ClosingError> for Error<'a>
impl<'a> From<ClosingError> for Error<'a>
Source§fn from(e: ClosingError) -> Error<'a>
fn from(e: ClosingError) -> Error<'a>
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> 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 more