Files
moli/moli-webapi-declare/src/error.rs
2026-08-11 00:10:12 +08:00

21 lines
439 B
Rust

#[derive(Debug, Clone, Eq, PartialEq)]
pub struct BindError {
message: String,
}
impl BindError {
pub fn new(message: impl Into<String>) -> Self {
Self {
message: message.into(),
}
}
}
impl std::fmt::Display for BindError {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
formatter.write_str(&self.message)
}
}
impl std::error::Error for BindError {}