1
1
use crate :: Getters ;
2
2
use serde:: { Deserialize , Serialize } ;
3
3
4
+ /// Represents the navigational links in a response.
5
+ ///
6
+ /// Contains the links to the current, next, and previous pages of the response.
7
+ ///
4
8
#[ derive( Default , Debug , Deserialize , Serialize , Clone , Getters ) ]
5
9
pub struct ResponseLinks {
6
10
#[ serde( rename = "self" ) ]
@@ -9,22 +13,33 @@ pub struct ResponseLinks {
9
13
pub prev : Option < Link > ,
10
14
}
11
15
16
+ /// Represents a navigational link in a response.
17
+ ///
18
+ /// Contains an optional url.
19
+ ///
12
20
#[ derive( Default , Debug , Deserialize , Serialize , Clone , Getters ) ]
13
21
pub struct Link {
14
22
pub href : Option < String > ,
15
23
}
16
24
17
- #[ derive( Default , Debug , Deserialize , Serialize , Clone , Getters ) ]
18
- pub struct Embedded < T > {
19
- pub records : Vec < T > ,
20
- }
21
-
25
+ /// Represents a navigational link in a response.
26
+ ///
27
+ /// Contains an optional url, and an optional boolean to indicate whether a link is templated or not.
28
+ ///
22
29
#[ derive( Default , Debug , Deserialize , Serialize , Clone , Getters ) ]
23
30
pub struct TemplateLink {
24
31
pub href : Option < String > ,
25
32
pub templated : Option < bool > ,
26
33
}
27
34
35
+ /// Represents a collection of results in a response.
36
+ ///
37
+ /// Contains a vector, which can hold any type of record returned by the API.
38
+ #[ derive( Default , Debug , Deserialize , Serialize , Clone , Getters ) ]
39
+ pub struct Embedded < T > {
40
+ pub records : Vec < T > ,
41
+ }
42
+
28
43
/// Represents the authorization and control flags for an asset in the all assets response.
29
44
///
30
45
/// Details the various boolean flags that are
@@ -45,4 +60,4 @@ pub struct Flags {
45
60
/// A `bool` indicating whether the asset supports the clawback operation.
46
61
/// If `true`, the issuer can claw back the asset from user accounts.
47
62
auth_clawback_enabled : bool ,
48
- }
63
+ }
0 commit comments