1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#![deny(missing_docs)]
#[allow(missing_docs)]
pub mod action;
#[allow(missing_docs)]
pub mod agent_activity;
pub mod bytes;
#[allow(missing_docs)]
pub mod call;
pub mod capability;
pub mod cell;
#[allow(missing_docs)]
pub mod chain;
pub mod countersigning;
#[allow(missing_docs)]
pub mod crdt;
pub mod dna_def;
pub mod entry;
#[allow(missing_docs)]
pub mod entry_def;
pub mod genesis;
#[allow(missing_docs)]
pub mod hash;
#[allow(missing_docs)]
pub mod info;
#[allow(missing_docs)]
pub mod init;
pub mod judged;
#[allow(missing_docs)]
pub mod link;
pub mod metadata;
#[allow(missing_docs)]
pub mod migrate_agent;
#[allow(missing_docs)]
pub mod op;
pub mod prelude;
#[cfg(feature = "properties")]
pub mod properties;
pub mod query;
pub mod rate_limit;
pub mod record;
pub mod request;
pub mod schedule;
pub mod signal;
pub mod signature;
pub use kitsune_p2p_timestamp as timestamp;
pub mod trace;
#[allow(missing_docs)]
pub mod validate;
pub mod version;
pub mod warrant;
#[allow(missing_docs)]
pub mod x_salsa20_poly1305;
#[allow(missing_docs)]
pub mod zome;
#[allow(missing_docs)]
pub mod zome_io;
#[allow(missing_docs)]
#[cfg(feature = "fixturators")]
pub mod fixt;
#[cfg(feature = "test_utils")]
pub mod test_utils;
pub use action::Action;
pub use entry::Entry;
pub use prelude::*;
pub mod dependencies {
pub use ::holochain_integrity_types;
pub use ::subtle;
}
use holochain_wasmer_common::WasmError;
#[allow(missing_docs)]
pub trait CallbackResult: Sized {
fn is_definitive(&self) -> bool;
fn try_from_wasm_error(wasm_error: WasmError) -> Result<Self, WasmError>;
}
#[macro_export]
macro_rules! impl_to_sql_via_as_ref {
($s: ty) => {
impl ::rusqlite::ToSql for $s {
fn to_sql(&self) -> ::rusqlite::Result<::rusqlite::types::ToSqlOutput<'_>> {
Ok(::rusqlite::types::ToSqlOutput::Borrowed(
self.as_ref().into(),
))
}
}
};
}
#[macro_export]
macro_rules! impl_to_sql_via_display {
($s: ty) => {
impl ::rusqlite::ToSql for $s {
fn to_sql(&self) -> ::rusqlite::Result<::rusqlite::types::ToSqlOutput<'_>> {
Ok(::rusqlite::types::ToSqlOutput::Owned(
self.to_string().into(),
))
}
}
};
}
#[cfg(any(test, feature = "test_utils"))]
pub static NOISE: once_cell::sync::Lazy<Vec<u8>> = once_cell::sync::Lazy::new(|| {
use rand::Rng;
let mut rng = rand::thread_rng();
std::iter::repeat_with(|| rng.gen())
.take(10_000_000)
.collect()
});