pub struct ModelCache { /* private fields */ }Expand description
Directory of per-provider cache files.
Implementations§
Source§impl ModelCache
impl ModelCache
Sourcepub fn for_agent_dir(agent_dir: &Path) -> Self
pub fn for_agent_dir(agent_dir: &Path) -> Self
<agent_dir>/cache/models.
Sourcepub fn path(&self, provider: &str) -> PathBuf
pub fn path(&self, provider: &str) -> PathBuf
Cache file of provider (unsafe characters replaced by _).
Sourcepub fn read(&self, provider: &str) -> Result<Option<CachedModels>, CacheError>
pub fn read(&self, provider: &str) -> Result<Option<CachedModels>, CacheError>
Trait Implementations§
Source§impl Clone for ModelCache
impl Clone for ModelCache
Source§impl Debug for ModelCache
impl Debug for ModelCache
impl Eq for ModelCache
Source§impl PartialEq for ModelCache
impl PartialEq for ModelCache
impl StructuralPartialEq for ModelCache
Auto Trait Implementations§
impl Freeze for ModelCache
impl RefUnwindSafe for ModelCache
impl Send for ModelCache
impl Sync for ModelCache
impl Unpin for ModelCache
impl UnsafeUnpin for ModelCache
impl UnwindSafe for ModelCache
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.