Files
gt-tool/src/lib.rs
Robert Garrett e0c21fceaf Autoformat the whole thing
I've been putting this off because I don't want to have many small
formatting commits, and I don't have any kind of pre-commit hook to do
it for me. So here it is :v
2025-06-01 13:28:06 -05:00

29 lines
617 B
Rust

use serde::{Deserialize, Serialize};
pub mod api;
pub mod cli;
pub mod structs;
#[derive(Debug, Deserialize, Serialize)]
pub struct ApiError {
message: String,
url: String,
}
#[derive(Debug)]
pub enum Error {
Placeholder, // TODO: Enumerate error modes
WrappedReqwestErr(reqwest::Error),
MissingAuthToken,
NoSuchFile, // for release attachment 'file exists' pre-check.
ApiErrorMessage(ApiError),
}
impl From<reqwest::Error> for crate::Error {
fn from(value: reqwest::Error) -> Self {
Self::WrappedReqwestErr(value)
}
}
type Result<T> = core::result::Result<T, Error>;