mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-02 10:05:36 +00:00
draft new api version
This commit is contained in:
parent
67d486cc4d
commit
3a9e84a3d9
19 changed files with 490 additions and 87 deletions
20
src/client/response/error.rs
Normal file
20
src/client/response/error.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use std::fmt::{Display, Formatter, Result};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
Meta(super::meta::Error),
|
||||
Stream,
|
||||
}
|
||||
|
||||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut Formatter) -> Result {
|
||||
match self {
|
||||
Self::Meta(reason) => {
|
||||
write!(f, "Meta read error: {reason}")
|
||||
}
|
||||
Self::Stream => {
|
||||
write!(f, "I/O stream error")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue