Skip to main content

CacheObjectResolver

Struct CacheObjectResolver 

Source
pub struct CacheObjectResolver { /* private fields */ }
Expand description

Resolves dependency index shard files from primary paths or the global cache directory.

Implementations§

Source§

impl CacheObjectResolver

Source

pub fn new(cache_dir: PathBuf) -> Self

Creates a new resolver backed by the specified global cache directory.

Source

pub fn resolve(&mut self, dep: &DependencyShardInfo) -> Option<PathBuf>

Resolves an existing .ridx shard file for the given dependency shard.

Resolution order:

  1. Exact dep.object_path if it exists on disk.
  2. cache_object_path(cache_dir, dep.unit_key) if it exists on disk.
  3. Resilient fallback: scans cache_dir/objects/*/*.ridx for shards matching dep.name, strictly requiring exact version and generation match.

Auto Trait Implementations§

§

impl Forget for CacheObjectResolver

§

impl Freeze for CacheObjectResolver
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<(String, Vec<CachedObjectInfo>)>: Freeze,

§

impl Move for CacheObjectResolver

§

impl RefUnwindSafe for CacheObjectResolver

§

impl Send for CacheObjectResolver
where RawVecInner: Send, RawTable<(String, Vec<CachedObjectInfo>)>: Send,

§

impl Sync for CacheObjectResolver
where RawVecInner: Sync, RawTable<(String, Vec<CachedObjectInfo>)>: Sync,

§

impl Unpin for CacheObjectResolver
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for CacheObjectResolver
where *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<(String, Vec<CachedObjectInfo>)>: UnsafeUnpin,

§

impl UnwindSafe for CacheObjectResolver
where RawVecInner: UnwindSafe, HashMap<String, Vec<CachedObjectInfo>>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.