pub struct ModuleRequest {
pub root_id: Symbol,
pub root: Arc<dyn Dir>,
pub importer: Option<ModuleIdentity>,
pub specifier: String,
pub codec: Symbol,
pub authority: SourceAuthority,
}Expand description
Complete input for resolving one source module.
Fields§
§root_id: SymbolStable identity assigned to the supplied root by its caller.
root: Arc<dyn Dir>The only directory through which source may be resolved.
importer: Option<ModuleIdentity>Importing module identity for relative resolution, if any.
specifier: StringRoot-relative or ./ / ../ module specifier.
codec: SymbolInstalled codec used by the read-eval broker.
Trusted host authority governing module source and evaluation.
Implementations§
Source§impl ModuleRequest
impl ModuleRequest
Sourcepub fn new(
root_id: Symbol,
root: Arc<dyn Dir>,
importer: Option<ModuleIdentity>,
specifier: String,
codec: Symbol,
authority: SourceAuthority,
) -> Self
pub fn new( root_id: Symbol, root: Arc<dyn Dir>, importer: Option<ModuleIdentity>, specifier: String, codec: Symbol, authority: SourceAuthority, ) -> Self
Builds a module request with every source and authority input explicit.
Auto Trait Implementations§
impl !RefUnwindSafe for ModuleRequest
impl !UnwindSafe for ModuleRequest
impl Freeze for ModuleRequest
impl Send for ModuleRequest
impl Sync for ModuleRequest
impl Unpin for ModuleRequest
impl UnsafeUnpin for ModuleRequest
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