Skip to main content

select

Function select 

Source
pub fn select(
    available: &[Version],
    constraints: &[(&str, &Constraint)],
    locked: Option<&Version>,
    policy: SelectionPolicy,
    excluded: &HashSet<Version>,
) -> Result<Option<usize>, SelectError>
Expand description

Choose one of available that allows and return its index. The newest allowed wins whatever the order of available; of equal versions the later one does. A locked that is among available and that keeps_lock wins instead. Ok(None) is a repository with no version tags: the caller takes its default branch.