Skip to main content

chaste_types/
checksums.rs

1// SPDX-FileCopyrightText: 2025 The Chaste Authors
2// SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
3
4pub use ssri;
5pub use ssri::{Error as SSRIError, Integrity};
6
7#[derive(Debug, Clone, PartialEq, Eq)]
8pub enum Checksums {
9    Tarball(Integrity),
10    RepackZip(Integrity),
11}
12
13impl Checksums {
14    pub fn integrity(&self) -> &Integrity {
15        match self {
16            Checksums::Tarball(inte) => inte,
17            Checksums::RepackZip(inte) => inte,
18        }
19    }
20}