pub enum Error<'a> {
BareResourceExport,
BareComplexValTypeExport(Value<'a>),
DuplicateRecordField(Name<'a>),
DuplicateVariantField(Name<'a>),
NonexistentVariantRefinement(u32),
IncompatibleVariantRefinement(Error<'a>),
DuplicateFlagsName(Name<'a>),
DuplicateEnumName(Name<'a>),
DuplicateExternName(&'a str, bool),
NotAResource(Error<'a>),
BorrowOutsideParam,
}
Expand description
There are several ways in which a type may be ill-formed:
Variants§
BareResourceExport
A component/instance exported a bare resource type not behind a tyvar (and therefore not named)
BareComplexValTypeExport(Value<'a>)
A component/instance exported certain complex value types not behind a tyvar (and therefore not named)
DuplicateRecordField(Name<'a>)
A record has multiple fields with the same name
DuplicateVariantField(Name<'a>)
A variant has multiple cases with the same name
NonexistentVariantRefinement(u32)
A variant case is marked as refining another case, but that case does not exist
IncompatibleVariantRefinement(Error<'a>)
A variant case is marked as refining another case, but its associated value is not a subtype of the value of the refined case
DuplicateFlagsName(Name<'a>)
A flags has multiple flags with the same name
DuplicateEnumName(Name<'a>)
An enum has multiple cases with the same name
DuplicateExternName(&'a str, bool)
An import/export has the same name as another; the boolean is true if it is an import
NotAResource(Error<'a>)
A value type owns or borrows a type that is not a resource type
BorrowOutsideParam
A borrow type exists somewhere other than a function parameter
Trait Implementations§
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