assorted_debian_utils/lib.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
// Copyright 2021 Sebastian Ramacher
// SPDX-License-Identifier: LGPL-3.0-or-later
//! # Collection of various utilities for Debian work
//!
//! This crate consists of the following modules:
//! * [architectures]: Helpers to handle Debian architectures
//! * [archive]: Helpers for various features of the Debian archive
//! * [buildinfo]: Helpers to handle `.buildinfo` files
//! * [excuses]: Helpers to handle `excuses.yaml` for testing migration
//! * [version]: Helpers to handle package versions
//! * [wb]: Helpers to generate commands for wanna-build
#![warn(missing_docs)]
#![warn(missing_debug_implementations)]
#![warn(clippy::use_self)]
use thiserror::Error;
pub mod architectures;
pub mod archive;
pub mod autoremovals;
pub mod buildinfo;
pub mod excuses;
pub mod release;
mod utils;
pub mod version;
pub mod wb;
// Re-export rfc822_like
pub use rfc822_like;
/// Parsing error
#[derive(Clone, Copy, Debug, Error)]
pub enum ParseError {
#[error("invalid architecture")]
/// Given string is not a valid architecture
InvalidArchitecture,
#[error("invalid version: {0}")]
/// Given string is not a valid version
InvalidVersion(#[from] version::VersionError),
#[error("invalid suite")]
/// Given string is not a valid suite
InvalidSuite,
#[error("invalid extension")]
/// Given string is not a valid suite or codename extension
InvalidExtension,
#[error("invalid codename")]
/// Given string is not a valid codename
InvalidCodename,
#[error("invalid suite or codename")]
/// Given string is not a valid suite or codename
InvalidSuiteOrCodename,
#[error("invalid multi-arch")]
/// Given string is not a valid multi-arch value
InvalidMultiArch,
#[error("invalid component")]
/// Given string is not a valid component
InvalidComponent,
}