pub struct ChainedClassResolver { /* private fields */ }Expand description
crate::ClassResolver composing a primary resolver (user’s PSR-4 /
classmap) with a fallback (typically StubClassResolver). The
primary is consulted first; if it misses, the fallback is tried.
AnalysisSession::with_psr4 and with_class_resolver automatically
wrap the user-supplied resolver in this chain so PHP built-ins are
resolvable through resolve_fqcn_to_path (and therefore
find_class_like) without per-consumer setup.
Implementations§
Source§impl ChainedClassResolver
impl ChainedClassResolver
pub fn new( primary: Arc<dyn ClassResolver>, fallback: Arc<dyn ClassResolver>, ) -> Self
Trait Implementations§
Source§impl ClassResolver for ChainedClassResolver
impl ClassResolver for ChainedClassResolver
Auto Trait Implementations§
impl !RefUnwindSafe for ChainedClassResolver
impl !UnwindSafe for ChainedClassResolver
impl Freeze for ChainedClassResolver
impl Send for ChainedClassResolver
impl Sync for ChainedClassResolver
impl Unpin for ChainedClassResolver
impl UnsafeUnpin for ChainedClassResolver
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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