ud 0.0.1

UpDate your dependencies!
Documentation
use derive_more::{Display, From, Into};

/// Coordinate — what uniquely names a thing to be versioned.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Display, From, Into)]
pub struct Coordinate(pub String);

/// Constraint — what the manifest asks for.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Display, From, Into)]
pub struct Constraint(pub String);

/// Version — a single concrete release.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Display, From, Into)]
pub struct Version(pub String);

/// Span — the knowledge of where each dependency physically sits in the manifest.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Span {
    pub start: usize,
    pub end: usize,
}

/// Dependency — one declared requirement.
#[derive(Debug, Clone)]
pub struct Dependency {
    pub coordinate: Coordinate,
    pub constraint: Constraint,
    pub span: Span,
    pub source_hint: Option<String>,
}

/// Availability — what a source returns for a coordinate.
#[derive(Debug, Clone, Default)]
pub struct Availability {
    pub versions: Vec<VersionMetadata>,
}

/// VersionMetadata — a single version with its associated metadata.
#[derive(Debug, Clone)]
pub struct VersionMetadata {
    pub version: Version,
    pub yanked: bool,
    pub prerelease: bool,
}

/// Verdict — the core's judgment per dependency.
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Verdict {
    Current { latest: Version },
    Outdated { target: Version },
    Yanked,
    Unsatisfiable { constraint: Constraint },
    Errored(String),
}

/// Report — the collected verdicts.
#[derive(Debug, Clone)]
pub struct Report {
    pub verdicts: Vec<(Dependency, Verdict)>,
}

impl Report {
    pub fn new() -> Self {
        Self {
            verdicts: Vec::new(),
        }
    }

    pub fn push(&mut self, dependency: Dependency, verdict: Verdict) {
        self.verdicts.push((dependency, verdict));
    }
}