13 lines
196 B
Rust
13 lines
196 B
Rust
|
use serde::Serialize;
|
||
|
|
||
|
#[derive(Clone, Serialize)]
|
||
|
pub struct Error<'a> {
|
||
|
pub error: &'a str,
|
||
|
}
|
||
|
|
||
|
impl<'a> Error<'a> {
|
||
|
pub fn error(error: &'a str) -> Self {
|
||
|
Self { error }
|
||
|
}
|
||
|
}
|