pub enum TealResolveError {
TypeCheck {
module: String,
errors: Vec<String>,
},
Expectation {
module: String,
expected: String,
errors: Vec<String>,
},
MissingFields {
module: String,
expected: String,
fields: Vec<String>,
},
Read {
module: String,
source: ReadError,
},
}Expand description
Error raised when a .tl module fails the type check at require time.
Every variant carries module — the name that was required, not the path it resolved
to — because that is the name the require in the caller’s source spells, and the
caller is where the mistake is read from. All four are returned as Some(Err) so the
Registry stops rather than falling through to a later resolver: a .tl that does not
check must not be quietly replaced by a .lua of the same name.
Variants§
TypeCheck
The module does not type-check on its own terms.
Fields
Expectation
The module type-checks on its own but is not assignable to the resolver’s
expect_type.
Fields
MissingFields
require_fields: required fields absent at run time.
Fields
Read
The file could not be read through the sandbox — outside the root, or gone between the resolver finding it and opening it.
Trait Implementations§
Source§impl Debug for TealResolveError
impl Debug for TealResolveError
Source§impl Display for TealResolveError
impl Display for TealResolveError
Source§impl Error for TealResolveError
impl Error for TealResolveError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for TealResolveError
impl !UnwindSafe for TealResolveError
impl Freeze for TealResolveError
impl Send for TealResolveError
impl Sync for TealResolveError
impl Unpin for TealResolveError
impl UnsafeUnpin for TealResolveError
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<E> ExternalError for E
impl<E> ExternalError for E
fn into_lua_err(self) -> Error
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