use http::Method;
use request::ApiRequest;
#[derive(Serialize)]
pub struct BlockGet<'a> {
#[serde(rename = "arg")]
pub hash: &'a str,
}
impl<'a> ApiRequest for BlockGet<'a> {
const PATH: &'static str = "/block/get";
}
pub struct BlockPut;
impl_skip_serialize!(BlockPut);
impl ApiRequest for BlockPut {
const PATH: &'static str = "/block/put";
const METHOD: &'static Method = &Method::POST;
}
#[derive(Serialize)]
pub struct BlockRm<'a> {
#[serde(rename = "arg")]
pub hash: &'a str,
}
impl<'a> ApiRequest for BlockRm<'a> {
const PATH: &'static str = "/block/rm";
}
#[derive(Serialize)]
pub struct BlockStat<'a> {
#[serde(rename = "arg")]
pub hash: &'a str,
}
impl<'a> ApiRequest for BlockStat<'a> {
const PATH: &'static str = "/block/stat";
}