mirror of
https://github.com/lexmount/moli.git
synced 2026-10-04 16:00:47 +00:00
21 lines
439 B
Rust
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 {}
|