mirror of
https://github.com/oxen-io/session-open-group-server.git
synced 2023-12-13 20:30:35 +01:00
24 lines
No EOL
473 B
Rust
24 lines
No EOL
473 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug)]
|
|
pub struct ValidationError;
|
|
impl warp::reject::Reject for ValidationError { }
|
|
|
|
#[derive(Deserialize, Serialize, Debug)]
|
|
pub struct Message {
|
|
pub server_id: Option<i64>,
|
|
pub text: String
|
|
}
|
|
|
|
impl Message {
|
|
|
|
pub fn is_valid(&self) -> bool {
|
|
return !self.text.is_empty();
|
|
}
|
|
}
|
|
|
|
#[derive(Debug, Deserialize)]
|
|
pub struct QueryOptions {
|
|
pub limit: Option<u16>,
|
|
pub from_server_id: Option<i64>
|
|
} |