16
16
17
17
//! Protocol buffer message definitions for Tink.
18
18
19
+ #![ no_std]
19
20
#![ deny( broken_intra_doc_links) ]
20
21
22
+ #[ cfg( feature = "json" ) ]
23
+ extern crate alloc;
24
+
21
25
#[ cfg( not( feature = "json" ) ) ]
22
26
include ! ( "codegen/google.crypto.tink.rs" ) ;
23
27
#[ cfg( feature = "json" ) ]
@@ -30,6 +34,7 @@ pub mod json {
30
34
//! the `i32` values used by prost.
31
35
pub mod key_status_type {
32
36
//! Manual JSON serialization for [`KeyStatusType`](crate::KeyStatusType) enums.
37
+ use alloc:: string:: String ;
33
38
use serde:: Deserialize ;
34
39
pub fn serialize < S : serde:: Serializer > (
35
40
val : & i32 ,
@@ -56,6 +61,7 @@ pub mod json {
56
61
}
57
62
pub mod output_prefix_type {
58
63
//! Manual JSON serialization for [`OutputPrefixType`](crate::OutputPrefixType) enums.
64
+ use alloc:: string:: String ;
59
65
use serde:: Deserialize ;
60
66
pub fn serialize < S : serde:: Serializer > (
61
67
val : & i32 ,
@@ -85,6 +91,7 @@ pub mod json {
85
91
pub mod key_material_type {
86
92
//! Manual JSON serialization for [`KeyMaterialType`](crate::key_data::KeyMaterialType)
87
93
//! enums.
94
+ use alloc:: string:: String ;
88
95
use serde:: Deserialize ;
89
96
pub fn serialize < S : serde:: Serializer > (
90
97
val : & i32 ,
@@ -113,6 +120,7 @@ pub mod json {
113
120
}
114
121
pub mod b64 {
115
122
//! Manual serialization implementations for base64-encoded binary data.
123
+ use alloc:: { string:: String , vec:: Vec } ;
116
124
use serde:: Deserialize ;
117
125
pub fn serialize < S : serde:: Serializer > (
118
126
val : & [ u8 ] ,
0 commit comments