pub struct BaseDep<'a> {
pub ptr: UniquePtr<DepIterator>,
/* private fields */
}
Expand description
A struct representing a Base Dependency.
Fields§
§ptr: UniquePtr<DepIterator>
Implementations§
Source§impl<'a> BaseDep<'a>
impl<'a> BaseDep<'a>
pub fn new(ptr: UniquePtr<DepIterator>, cache: &'a Cache) -> BaseDep<'_>
Sourcepub fn target_package(&self) -> &Package<'a>
pub fn target_package(&self) -> &Package<'a>
Return the target package.
For Reverse Dependencies this will actually return the parent package
Sourcepub fn comp_type(&self) -> Option<&str>
pub fn comp_type(&self) -> Option<&str>
Comparison type of the dependency version, if specified.
pub fn all_targets(&self) -> Vec<Version<'_>>
Methods from Deref<Target = DepIterator>§
Sourcepub unsafe fn parent_pkg(&self) -> UniquePtr<PkgIterator>
pub unsafe fn parent_pkg(&self) -> UniquePtr<PkgIterator>
The Parent PkgIterator for this dependency
§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.
Sourcepub unsafe fn parent_ver(&self) -> UniquePtr<VerIterator>
pub unsafe fn parent_ver(&self) -> UniquePtr<VerIterator>
The Parent VerIterator for this dependency
§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.
Sourcepub fn comp_type(&self) -> Result<&str, Exception>
pub fn comp_type(&self) -> Result<&str, Exception>
String representation of the dependency compare type “”,“<=”,“>=”,“<”,“>”,“=”,“!=”
This returns Error for no compare type.
pub fn dep_type(&self) -> u8
Sourcepub fn is_critical(&self) -> bool
pub fn is_critical(&self) -> bool
Sourcepub fn is_reverse(&self) -> bool
pub fn is_reverse(&self) -> bool
Return True if the dep is reverse, false if normal
pub fn target_ver(&self) -> Result<&str, Exception>
Sourcepub unsafe fn target_pkg(&self) -> UniquePtr<PkgIterator>
pub unsafe fn target_pkg(&self) -> UniquePtr<PkgIterator>
Return the Target Package for the dependency.
§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.
Sourcepub unsafe fn all_targets(&self) -> UniquePtr<CxxVector<VerIterator>>
pub unsafe fn all_targets(&self) -> UniquePtr<CxxVector<VerIterator>>
Returns a CxxVector of VerIterators.
§Safety
These can not be owned and will need to be Cloned with unique.
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.
Sourcepub fn or_dep(&self) -> bool
pub fn or_dep(&self) -> bool
Return true if this dep is Or’d with the next. The last dep in the or group will return False.
pub fn index(&self) -> u64
Sourcepub unsafe fn unique(&self) -> UniquePtr<DepIterator>
pub unsafe fn unique(&self) -> UniquePtr<DepIterator>
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.