@@ -137,6 +137,55 @@ where A::Target: chain::Access, L::Target: Logger {
137
137
}
138
138
}
139
139
140
+ /// (C-not exported) as the bindings concretize everything and have constructors for us
141
+ impl < P : Deref < Target = P2PGossipSync < G , A , L > > , G : Deref < Target = NetworkGraph < L > > , A : Deref , L : Deref >
142
+ GossipSync < P , & RapidGossipSync < G , L > , G , A , L >
143
+ where
144
+ A :: Target : chain:: Access ,
145
+ L :: Target : Logger ,
146
+ {
147
+ /// Initializes a new [`GossipSync::P2P`] variant.
148
+ pub fn p2p ( gossip_sync : P ) -> Self {
149
+ GossipSync :: P2P ( gossip_sync)
150
+ }
151
+ }
152
+
153
+ /// (C-not exported) as the bindings concretize everything and have constructors for us
154
+ impl < ' a , R : Deref < Target = RapidGossipSync < G , L > > , G : Deref < Target = NetworkGraph < L > > , L : Deref >
155
+ GossipSync <
156
+ & P2PGossipSync < G , & ' a ( dyn chain:: Access + Send + Sync ) , L > ,
157
+ R ,
158
+ G ,
159
+ & ' a ( dyn chain:: Access + Send + Sync ) ,
160
+ L ,
161
+ >
162
+ where
163
+ L :: Target : Logger ,
164
+ {
165
+ /// Initializes a new [`GossipSync::Rapid`] variant.
166
+ pub fn rapid ( gossip_sync : R ) -> Self {
167
+ GossipSync :: Rapid ( gossip_sync)
168
+ }
169
+ }
170
+
171
+ /// (C-not exported) as the bindings concretize everything and have constructors for us
172
+ impl < ' a , L : Deref >
173
+ GossipSync <
174
+ & P2PGossipSync < & ' a NetworkGraph < L > , & ' a ( dyn chain:: Access + Send + Sync ) , L > ,
175
+ & RapidGossipSync < & ' a NetworkGraph < L > , L > ,
176
+ & ' a NetworkGraph < L > ,
177
+ & ' a ( dyn chain:: Access + Send + Sync ) ,
178
+ L ,
179
+ >
180
+ where
181
+ L :: Target : Logger ,
182
+ {
183
+ /// Initializes a new [`GossipSync::None`] variant.
184
+ pub fn none ( ) -> Self {
185
+ GossipSync :: None
186
+ }
187
+ }
188
+
140
189
/// Decorates an [`EventHandler`] with common functionality provided by standard [`EventHandler`]s.
141
190
struct DecoratingEventHandler <
142
191
' a ,
0 commit comments