pub struct PkgCacheFile { /* private fields */ }Implementations§
Source§impl PkgCacheFile
impl PkgCacheFile
Sourcepub fn update(&self, progress: Pin<&mut AcqTextStatus>) -> Result<(), Exception>
pub fn update(&self, progress: Pin<&mut AcqTextStatus>) -> Result<(), Exception>
Update the package lists, handle errors and return a Result.
Sourcepub fn get_indexes(&self, fetcher: &PkgAcquire) -> bool
pub fn get_indexes(&self, fetcher: &PkgAcquire) -> bool
Loads the index files into PkgAcquire.
Used to get to source list uris.
It’s not clear if this returning a bool is useful.
Sourcepub unsafe fn create_depcache(&self) -> UniquePtr<PkgDepCache>
pub unsafe fn create_depcache(&self) -> UniquePtr<PkgDepCache>
Sourcepub unsafe fn create_records(&self) -> UniquePtr<PkgRecords>
pub unsafe fn create_records(&self) -> UniquePtr<PkgRecords>
pub unsafe fn source_records( &self, ) -> Result<UniquePtr<SourceRecords>, Exception>
Sourcepub fn priority(&self, version: &VerIterator) -> i32
pub fn priority(&self, version: &VerIterator) -> i32
The priority of the Version as shown in apt policy.
Sourcepub unsafe fn find_index(&self, file: &PkgFileIterator) -> UniquePtr<IndexFile>
pub unsafe fn find_index(&self, file: &PkgFileIterator) -> UniquePtr<IndexFile>
Lookup the IndexFile of the Package file
§Safety
The IndexFile can not outlive PkgCacheFile.
The returned UniquePtr cannot outlive the cache.
Sourcepub unsafe fn find_pkg(&self, name: &str) -> UniquePtr<PkgIterator>
pub unsafe fn find_pkg(&self, name: &str) -> UniquePtr<PkgIterator>
Return a package by name and optionally architecture.
§Safety
If the Internal Pkg Pointer is NULL, operations can segfault.
You should call make_safe() asap to convert it to an Option.
The returned UniquePtr cannot outlive the cache.
Sourcepub unsafe fn begin(&self) -> UniquePtr<PkgIterator>
pub unsafe fn begin(&self) -> UniquePtr<PkgIterator>
Return the pointer to the start of the PkgIterator.
§Safety
If the Internal Pkg Pointer is NULL, operations can segfault.
You should call raw_iter() asap.
The returned UniquePtr cannot outlive the cache.