lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README | LICENSE

error.rs (1895B)


      1 use thiserror::Error;
      2 
      3 #[derive(Debug, Error, PartialEq, Eq)]
      4 pub enum RadrootsRuntimeDistributionError {
      5     #[error("parse runtime distribution contract: {0}")]
      6     Parse(String),
      7     #[error("runtime distribution schema `{found}` does not match `{expected}`")]
      8     UnexpectedSchema {
      9         expected: &'static str,
     10         found: String,
     11     },
     12     #[error("runtime `{0}` not found in distribution contract")]
     13     UnknownRuntime(String),
     14     #[error("runtime `{0}` is not installable through the local runtime distribution contract")]
     15     RuntimeNotInstallable(String),
     16     #[error("runtime `{0}` has no target set in the distribution contract")]
     17     MissingTargetSet(String),
     18     #[error("runtime `{runtime_id}` references unknown artifact adapter `{adapter_id}`")]
     19     UnknownArtifactAdapter {
     20         runtime_id: String,
     21         adapter_id: String,
     22     },
     23     #[error("channel `{0}` is not defined in the runtime distribution contract")]
     24     UnknownChannel(String),
     25     #[error("channel `{0}` is defined but not active in the runtime distribution contract")]
     26     InactiveChannel(String),
     27     #[error(
     28         "target set `{target_set_id}` for runtime `{runtime_id}` references unknown target `{target_id}`"
     29     )]
     30     UnknownTarget {
     31         runtime_id: String,
     32         target_set_id: String,
     33         target_id: String,
     34     },
     35     #[error("runtime `{runtime_id}` does not support os `{os}` arch `{arch}`")]
     36     UnsupportedPlatform {
     37         runtime_id: String,
     38         os: String,
     39         arch: String,
     40     },
     41     #[error("target `{target_id}` references unknown archive format `{archive_format_id}`")]
     42     UnknownArchiveFormat {
     43         target_id: String,
     44         archive_format_id: String,
     45     },
     46     #[error("target `{target_id}` for runtime `{runtime_id}` does not define an archive format")]
     47     MissingArchiveFormat {
     48         runtime_id: String,
     49         target_id: String,
     50     },
     51 }