Struct debian_control::lossless::relations::Entry
source · pub struct Entry(/* private fields */);Implementations§
source§impl Entry
impl Entry
pub fn new() -> Self
pub fn wrap_and_sort(&self) -> Self
pub fn relations(&self) -> impl Iterator<Item = Relation> + '_
pub fn get_relation(&self, idx: usize) -> Option<Relation>
sourcepub fn satisfied_by(
&self,
package_version: &mut dyn FnMut(&str) -> Option<Version>,
) -> bool
pub fn satisfied_by( &self, package_version: &mut dyn FnMut(&str) -> Option<Version>, ) -> bool
Check if this entry is satisfied by the given package versions.
§Arguments
package_version- A function that returns the version of a package.
§Example
use debian_control::lossless::relations::Entry;
let entry = Entry::from(vec!["samba (>= 2.0)".parse().unwrap()]);
assert!(entry.satisfied_by(&mut |name| {
match name {
"samba" => Some("2.0".parse().unwrap()),
_ => None
}}));Trait Implementations§
source§impl Ord for Entry
impl Ord for Entry
source§impl PartialOrd for Entry
impl PartialOrd for Entry
impl Eq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl !RefUnwindSafe for Entry
impl !Send for Entry
impl !Sync for Entry
impl Unpin for Entry
impl !UnwindSafe for Entry
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