Create parameter data builder

This commit is contained in:
timvisee 2018-04-02 01:41:47 +02:00
parent 928b3d9beb
commit 3ba39751f2
No known key found for this signature in database
GPG key ID: 109CBA0BF74036C2
6 changed files with 38 additions and 10 deletions

View file

@ -8,6 +8,7 @@ workspace = ".."
arrayref = "0.3"
base64 = "0.9"
chrono = "0.4"
derive_builder = "0.5"
failure = "0.1"
failure_derive = "0.1"
hkdf = "0.3"

View file

@ -149,7 +149,8 @@ impl<'a> Params<'a> {
}
/// The parameters data object, that is sent to the server.
#[derive(Clone, Debug, Serialize)]
// TODO: make sure downloads are in-bound when using the builder
#[derive(Clone, Debug, Builder, Serialize)]
pub struct ParamsData {
/// The number of times this file may be downloaded.
/// This value must be in the `(0,20)` bounds, as enforced by Send servers.

View file

@ -1,5 +1,7 @@
#[macro_use]
extern crate arrayref;
#[macro_use]
extern crate derive_builder;
extern crate failure;
#[macro_use]
extern crate failure_derive;