pub enum Error<'a> {
BareResourceExport,
BareComplexValTypeExport(Value<'a>),
DuplicateRecordField(Name<'a>),
DuplicateVariantField(Name<'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
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> UnsafeUnpin 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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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 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>
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