Struct PkgIterator

Source
#[repr(C)]
pub struct PkgIterator { /* private fields */ }

Implementations§

Source§

impl PkgIterator

Source

pub fn name(&self) -> &str

Get the name of the package without the architecture.

Source§

impl PkgIterator

Source

pub fn arch(&self) -> &str

Get the architecture of a package.

Source§

impl PkgIterator

Source

pub fn fullname(&self, pretty: bool) -> String

Get the fullname of the package.

Pretty is a bool that will omit the native arch.

Source§

impl PkgIterator

Source

pub fn current_state(&self) -> u8

Get the current state of a package.

Source§

impl PkgIterator

Source

pub fn inst_state(&self) -> u8

Get the installed state of a package.

Source§

impl PkgIterator

Source

pub fn selected_state(&self) -> u8

Get the selected state of a package.

Source§

impl PkgIterator

Source

pub fn is_essential(&self) -> bool

True if the package is essential.

Source§

impl PkgIterator

Source

pub unsafe fn current_version(&self) -> UniquePtr<VerIterator>

Get a pointer the the currently installed version.

§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.

Source§

impl PkgIterator

Source

pub unsafe fn versions(&self) -> UniquePtr<VerIterator>

Get a pointer to the beginning of the VerIterator.

§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.

Source§

impl PkgIterator

Source

pub unsafe fn provides(&self) -> UniquePtr<PrvIterator>

Get the providers of this package.

§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.

Source§

impl PkgIterator

Source

pub unsafe fn rdepends(&self) -> UniquePtr<DepIterator>

Get the reverse dependencies of this package

§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.

Source§

impl PkgIterator

Source

pub fn index(&self) -> u64

Source§

impl PkgIterator

Source

pub unsafe fn unique(&self) -> UniquePtr<PkgIterator>

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.

Source§

impl PkgIterator

Source

pub fn raw_next(self: Pin<&mut Self>)

Source§

impl PkgIterator

Source

pub fn end(&self) -> bool

Trait Implementations§

Source§

impl ExternType for PkgIterator

Source§

type Kind = Opaque

Source§

type Id

A type-level representation of the type’s C++ namespace and type name. Read more
Source§

impl UniquePtrTarget for PkgIterator

Auto Trait Implementations§

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.