1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use crate::error::ApiError;

pub use fire::header::Method;

use serde::{Serialize, de::DeserializeOwned};

/// Basic request definition.
/// 
/// The request will be serialized and deserialized
/// via Json to ease updating structures without breaking backwards
/// compatibility.
pub trait Request: Serialize + DeserializeOwned {
	type Response: Serialize + DeserializeOwned;
	type Error: ApiError;

	const PATH: &'static str;
	const METHOD: Method;
	const SIZE_LIMIT: usize = 4096;
	const TIMEOUT: usize = 60;
	const HEADERS: &'static [&'static str] = &[];
}