api: BoxFut -> ApiFuture
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -481,7 +481,7 @@ fn download_file(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
_rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let store = tools::required_string_param(¶m, "store")?;
|
||||
|
||||
@ -544,7 +544,7 @@ fn upload_backup_log(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
_rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let store = tools::required_string_param(¶m, "store")?;
|
||||
|
||||
|
@ -47,7 +47,7 @@ fn upgrade_to_backup_protocol(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let debug = param["debug"].as_bool().unwrap_or(false);
|
||||
|
||||
@ -569,7 +569,7 @@ fn dynamic_chunk_index(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let env: &BackupEnvironment = rpcenv.as_ref();
|
||||
|
||||
@ -642,7 +642,7 @@ fn fixed_chunk_index(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let env: &BackupEnvironment = rpcenv.as_ref();
|
||||
|
||||
|
@ -115,7 +115,7 @@ fn upload_fixed_chunk(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let wid = tools::required_integer_param(¶m, "wid")? as usize;
|
||||
let size = tools::required_integer_param(¶m, "size")? as u32;
|
||||
@ -177,7 +177,7 @@ fn upload_dynamic_chunk(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let wid = tools::required_integer_param(¶m, "wid")? as usize;
|
||||
let size = tools::required_integer_param(¶m, "size")? as u32;
|
||||
@ -218,7 +218,7 @@ fn upload_speedtest(
|
||||
_param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let resp = req_body
|
||||
.map_err(Error::from)
|
||||
@ -265,7 +265,7 @@ fn upload_blob(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let file_name = tools::required_string_param(¶m, "file-name")?.to_owned();
|
||||
let encoded_size = tools::required_integer_param(¶m, "encoded-size")? as usize;
|
||||
|
@ -50,7 +50,7 @@ fn upgrade_to_backup_reader_protocol(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let debug = param["debug"].as_bool().unwrap_or(false);
|
||||
|
||||
@ -171,7 +171,7 @@ fn download_file(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let env: &ReaderEnvironment = rpcenv.as_ref();
|
||||
let env2 = env.clone();
|
||||
@ -222,7 +222,7 @@ fn download_chunk(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let env: &ReaderEnvironment = rpcenv.as_ref();
|
||||
|
||||
@ -258,7 +258,7 @@ fn download_chunk_old(
|
||||
param: Value,
|
||||
_info: &ApiMethod,
|
||||
rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let env: &ReaderEnvironment = rpcenv.as_ref();
|
||||
let env2 = env.clone();
|
||||
@ -303,7 +303,7 @@ fn speedtest(
|
||||
_param: Value,
|
||||
_info: &ApiMethod,
|
||||
_rpcenv: Box<dyn RpcEnvironment>,
|
||||
) -> Result<BoxFut, Error> {
|
||||
) -> Result<ApiFuture, Error> {
|
||||
|
||||
let buffer = vec![65u8; 1024*1024]; // nonsense [A,A,A...]
|
||||
|
||||
|
Reference in New Issue
Block a user