dimicon 0.2.0

Docker Image Icon - A library for fetching Docker image icons
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

/// dimicon library error types
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum Error {
    #[error("HTTP request failed: {0}")]
    Request(#[from] reqwest::Error),

    #[error("invalid image reference: {0}")]
    InvalidImageReference(&'static str),

    #[error("rate limited by upstream service")]
    RateLimited,
}

pub type Result<T> = std::result::Result<T, Error>;