pub enum ResolveError {
PathTraversal {
name: String,
},
AssetParse {
source: Box<dyn Error + Send + Sync>,
},
Io {
path: PathBuf,
source: Error,
},
}Expand description
Error type for module resolution.
Structurally represents domain-specific errors that occur during resolve().
Converted to a Lua error via mlua::Error::external() and can be
recovered on the caller side with err.downcast_ref::<ResolveError>().
Construction-time errors (e.g. root directory not found) are returned as
sandbox::InitError and are not included here.
Variants§
PathTraversal
Path access outside the sandbox detected.
AssetParse
Asset parse failure.
Generalized to hold different error types per parser.
resolvers::json_parser() stores serde_json::Error;
custom parsers can store any error type.
Io
File I/O error.
Raised when a file exists but cannot be read (e.g. permission denied, is a directory).
Trait Implementations§
Source§impl Debug for ResolveError
impl Debug for ResolveError
Source§impl Display for ResolveError
impl Display for ResolveError
Source§impl Error for ResolveError
impl Error for ResolveError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ResolveError
impl !RefUnwindSafe for ResolveError
impl Send for ResolveError
impl Sync for ResolveError
impl Unpin for ResolveError
impl UnsafeUnpin for ResolveError
impl !UnwindSafe for ResolveError
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<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>
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