pub struct PackageJsonResolver<TSys: FsRead + FsMetadata> { /* private fields */ }Implementations§
Source§impl<TSys: FsRead + FsMetadata> PackageJsonResolver<TSys>
impl<TSys: FsRead + FsMetadata> PackageJsonResolver<TSys>
pub fn new(sys: TSys, loader_cache: Option<PackageJsonCacheRc>) -> Self
pub fn get_closest_package_json( &self, file_path: &Path, ) -> Result<Option<PackageJsonRc>, PackageJsonLoadError>
Sourcepub fn get_closest_package_jsons<'a>(
&'a self,
file_path: &'a Path,
) -> ClosestPackageJsonsIterator<'a, TSys>
pub fn get_closest_package_jsons<'a>( &'a self, file_path: &'a Path, ) -> ClosestPackageJsonsIterator<'a, TSys>
Gets the closest package.json files, iterating from the nearest directory to the furthest ancestor directory.
pub fn load_package_json( &self, path: &Path, ) -> Result<Option<PackageJsonRc>, PackageJsonLoadError>
Trait Implementations§
Auto Trait Implementations§
impl<TSys> Freeze for PackageJsonResolver<TSys>where
TSys: Freeze,
impl<TSys> !RefUnwindSafe for PackageJsonResolver<TSys>
impl<TSys> !Send for PackageJsonResolver<TSys>
impl<TSys> !Sync for PackageJsonResolver<TSys>
impl<TSys> Unpin for PackageJsonResolver<TSys>where
TSys: Unpin,
impl<TSys> !UnwindSafe for PackageJsonResolver<TSys>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more