src/server/rest.rs: use generics to pass RpcEnvironment
This commit is contained in:
parent
2edc341b29
commit
f757b30efc
@ -223,8 +223,8 @@ fn proxy_protected_request(
|
|||||||
return Box::new(resp);
|
return Box::new(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn handle_sync_api_request(
|
pub fn handle_sync_api_request<Env: RpcEnvironment>(
|
||||||
mut rpcenv: RestEnvironment,
|
mut rpcenv: Env,
|
||||||
info: &'static ApiMethod,
|
info: &'static ApiMethod,
|
||||||
formatter: &'static OutputFormatter,
|
formatter: &'static OutputFormatter,
|
||||||
parts: Parts,
|
parts: Parts,
|
||||||
@ -263,8 +263,8 @@ pub fn handle_sync_api_request(
|
|||||||
Box::new(resp)
|
Box::new(resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn handle_async_api_request(
|
pub fn handle_async_api_request<Env: RpcEnvironment>(
|
||||||
mut rpcenv: RestEnvironment,
|
mut rpcenv: Env,
|
||||||
info: &'static ApiAsyncMethod,
|
info: &'static ApiAsyncMethod,
|
||||||
formatter: &'static OutputFormatter,
|
formatter: &'static OutputFormatter,
|
||||||
parts: Parts,
|
parts: Parts,
|
||||||
|
Loading…
Reference in New Issue
Block a user