pub struct PackageFile<'a> { /* private fields */ }
Expand description
Stores information about the files used to generate the cache
Package files are referenced by Version structures to be able to know after which Packages file includes this Version.
Implementations§
Source§impl<'a> PackageFile<'a>
impl<'a> PackageFile<'a>
pub fn new(ptr: UniquePtr<PkgFileIterator>, cache: &'a Cache) -> PackageFile<'_>
pub fn index_file(&self) -> &IndexFile
Source§impl<'a> PackageFile<'a>
impl<'a> PackageFile<'a>
Sourcepub fn index_type(&self) -> Option<&str>
pub fn index_type(&self) -> Option<&str>
The Index Type of the PackageFile. Known values are:
Debian Package Index, Debian Translation Index and Debian dpkg status file,
Methods from Deref<Target = PkgFileIterator>§
Sourcepub fn codename(&self) -> Result<&str, Exception>
pub fn codename(&self) -> Result<&str, Exception>
The Codename of the PackageFile. ex: main, non-free
Sourcepub fn site(&self) -> Result<&str, Exception>
pub fn site(&self) -> Result<&str, Exception>
The Hostname of the PackageFile. ex: deb.debian.org
Sourcepub fn index_type(&self) -> Result<&str, Exception>
pub fn index_type(&self) -> Result<&str, Exception>
The Index Type of the PackageFile. Known values are:
Debian Package Index, Debian Translation Index, Debian dpkg status file,
Sourcepub fn is_downloadable(&self) -> bool
pub fn is_downloadable(&self) -> bool
true
if the PackageFile contains packages that can be downloaded
Sourcepub unsafe fn unique(&self) -> UniquePtr<PkgFileIterator>
pub unsafe fn unique(&self) -> UniquePtr<PkgFileIterator>
Clone the pointer.
§Safety
If the inner pointer is null segfaults can occur.
Using crate::raw::IntoRawIter::make_safe
to convert to an Option
is recommended.
The returned UniquePtr cannot outlive the cache.