mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-11 13:24:41 +10:00
20 lines
478 B
Rust
20 lines
478 B
Rust
use std::fmt::Display;
|
|
|
|
use serde_with::SerializeDisplay;
|
|
|
|
#[derive(SerializeDisplay)]
|
|
pub enum LibraryError {
|
|
MetaNotFound(String),
|
|
}
|
|
impl Display for LibraryError {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
LibraryError::MetaNotFound(id) => write!(
|
|
f,
|
|
"Could not locate any installed version of game ID {} in the database",
|
|
id
|
|
),
|
|
}
|
|
}
|
|
}
|