All checks were successful
Build Crate / build (push) Successful in 1m47s
22 lines
416 B
Rust
22 lines
416 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Serialize, Deserialize, Clone)]
|
|
pub struct GenericResponse {
|
|
pub status: String,
|
|
}
|
|
|
|
impl GenericResponse {
|
|
#[cfg(engine)]
|
|
pub fn ok() -> Self {
|
|
GenericResponse {
|
|
status: String::new(),
|
|
}
|
|
}
|
|
#[cfg(engine)]
|
|
pub fn err(msg: &str) -> Self {
|
|
GenericResponse {
|
|
status: msg.to_string(),
|
|
}
|
|
}
|
|
}
|