pub struct WorkspaceResolver { /* private fields */ }Expand description
A resolver rooted at one explicitly authorized native directory.
Requires the filesystem-compiler feature. On target_os = "unknown" —
browser WASM — there is no filesystem to authorize and cap-std is not in
the graph, so construction fails with did_workspace_root_error even when
the feature is on; use MemoryResolver there.
Implementations§
Trait Implementations§
Source§impl Clone for WorkspaceResolver
impl Clone for WorkspaceResolver
Source§fn clone(&self) -> WorkspaceResolver
fn clone(&self) -> WorkspaceResolver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WorkspaceResolver
impl Debug for WorkspaceResolver
Source§impl SourceResolver for WorkspaceResolver
Available on crate feature filesystem-compiler only.
impl SourceResolver for WorkspaceResolver
Available on crate feature
filesystem-compiler only.fn identify( &self, from: Option<&SourceId>, import: &str, ) -> Result<SourceId, ResolveError>
fn load( &self, id: &SourceId, limits: &Limits, ) -> Result<ResolvedSource, ResolveError>
Source§fn load_with_context(
&self,
id: &SourceId,
context: &RuntimeContext,
) -> Result<ResolvedSource, ResolveError>
fn load_with_context( &self, id: &SourceId, context: &RuntimeContext, ) -> Result<ResolvedSource, ResolveError>
Loads with cooperative runtime cancellation and deadline checks.
Implementations that do long-running work may override this method to
checkpoint internally.
fn resolve( &self, from: Option<&SourceId>, import: &str, limits: &Limits, ) -> Result<ResolvedSource, ResolveError>
fn resolve_with_context( &self, from: Option<&SourceId>, import: &str, context: &RuntimeContext, ) -> Result<ResolvedSource, ResolveError>
Auto Trait Implementations§
impl Freeze for WorkspaceResolver
impl RefUnwindSafe for WorkspaceResolver
impl Send for WorkspaceResolver
impl Sync for WorkspaceResolver
impl Unpin for WorkspaceResolver
impl UnsafeUnpin for WorkspaceResolver
impl UnwindSafe for WorkspaceResolver
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