pub struct LayeredLoader<P: PackLoader, S: PackLoader> {
pub primary: P,
pub secondary: S,
}Expand description
Loader that delegates to a primary loader and falls back to a
secondary one when the primary returns “not found”. The CLI uses
this with the workspace packs/ directory as primary and
EmbeddedLoader as secondary, so workspace-vendored packs always
shadow built-ins of the same name.
Fields§
§primary: PPrimary lookup; takes precedence over secondary.
secondary: SFallback lookup, used when primary.load(...) returns Err.
Implementations§
Source§impl<P: PackLoader, S: PackLoader> LayeredLoader<P, S>
impl<P: PackLoader, S: PackLoader> LayeredLoader<P, S>
Trait Implementations§
Source§impl<P: PackLoader, S: PackLoader> PackLoader for LayeredLoader<P, S>
impl<P: PackLoader, S: PackLoader> PackLoader for LayeredLoader<P, S>
Auto Trait Implementations§
impl<P, S> Freeze for LayeredLoader<P, S>
impl<P, S> RefUnwindSafe for LayeredLoader<P, S>where
P: RefUnwindSafe,
S: RefUnwindSafe,
impl<P, S> Send for LayeredLoader<P, S>
impl<P, S> Sync for LayeredLoader<P, S>
impl<P, S> Unpin for LayeredLoader<P, S>
impl<P, S> UnsafeUnpin for LayeredLoader<P, S>where
P: UnsafeUnpin,
S: UnsafeUnpin,
impl<P, S> UnwindSafe for LayeredLoader<P, S>where
P: UnwindSafe,
S: UnwindSafe,
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