mirror of
https://github.com/timvisee/ffsend.git
synced 2025-10-05 18:24:18 +02:00
Create parameter data builder
This commit is contained in:
parent
928b3d9beb
commit
3ba39751f2
6 changed files with 38 additions and 10 deletions
|
@ -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"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#[macro_use]
|
||||
extern crate arrayref;
|
||||
#[macro_use]
|
||||
extern crate derive_builder;
|
||||
extern crate failure;
|
||||
#[macro_use]
|
||||
extern crate failure_derive;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue