Enum deno_core::ModuleLoadResponse
source · pub enum ModuleLoadResponse {
Sync(Result<ModuleSource, Error>),
Async(Pin<Box<ModuleSourceFuture>>),
}
Expand description
Result of calling ModuleLoader::load
.
Variants§
Sync(Result<ModuleSource, Error>)
Source file is available synchronously - eg. embedder might have
collected all the necessary sources in ModuleLoader::prepare_module_load
.
Slightly cheaper than Async
as it avoids boxing.
Async(Pin<Box<ModuleSourceFuture>>)
Source file needs to be loaded. Requires boxing due to recrusive nature of module loading.
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleLoadResponse
impl !Send for ModuleLoadResponse
impl !Sync for ModuleLoadResponse
impl Unpin for ModuleLoadResponse
impl !UnwindSafe for ModuleLoadResponse
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