pub struct SourceRecords { /* private fields */ }Implementations§
Source§impl SourceRecords
impl SourceRecords
pub fn new(ptr: UniquePtr<SourceRecords>) -> SourceRecords
Sourcepub fn lookup(
&self,
name: String,
src_only: bool,
) -> Option<Ref<'_, UniquePtr<SourceParser>>>
pub fn lookup( &self, name: String, src_only: bool, ) -> Option<Ref<'_, UniquePtr<SourceParser>>>
Lookup the string name of the package.
§Example:
use rust_apt::new_cache;
let cache = new_cache!().unwrap();
let Ok(src_records) = cache.source_records() else {
// Requires at least one `deb-src` entry in APT sources.
return;
};
while let Some(record) = src_records.lookup("libapt-pkg-dev".to_string(), false) {
println!("{}", record.package());
}Auto Trait Implementations§
impl !Freeze for SourceRecords
impl !RefUnwindSafe for SourceRecords
impl !Send for SourceRecords
impl !Sync for SourceRecords
impl Unpin for SourceRecords
impl UnwindSafe for SourceRecords
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