pub enum GossipSync<P: Deref<Target = P2PGossipSync<G, A, L>>, R: Deref<Target = RapidGossipSync<G, L>>, G: Deref<Target = NetworkGraph<L>>, A: Deref, L: Deref>where
A::Target: Access,
L::Target: Logger,{
P2P(P),
Rapid(R),
None,
}
Expand description
Either P2PGossipSync
or RapidGossipSync
.
Variants§
P2P(P)
Gossip sync via the lightning peer-to-peer network as defined by BOLT 7.
Rapid(R)
Rapid gossip sync from a trusted server.
None
No gossip sync.
Implementations§
source§impl<P: Deref<Target = P2PGossipSync<G, A, L>>, G: Deref<Target = NetworkGraph<L>>, A: Deref, L: Deref> GossipSync<P, &RapidGossipSync<G, L>, G, A, L>where
A::Target: Access,
L::Target: Logger,
impl<P: Deref<Target = P2PGossipSync<G, A, L>>, G: Deref<Target = NetworkGraph<L>>, A: Deref, L: Deref> GossipSync<P, &RapidGossipSync<G, L>, G, A, L>where
A::Target: Access,
L::Target: Logger,
(C-not exported) as the bindings concretize everything and have constructors for us
sourcepub fn p2p(gossip_sync: P) -> Self
pub fn p2p(gossip_sync: P) -> Self
Initializes a new GossipSync::P2P
variant.
source§impl<'a, R: Deref<Target = RapidGossipSync<G, L>>, G: Deref<Target = NetworkGraph<L>>, L: Deref> GossipSync<&P2PGossipSync<G, &'a (dyn Access + Send + Sync), L>, R, G, &'a (dyn Access + Send + Sync), L>where
L::Target: Logger,
impl<'a, R: Deref<Target = RapidGossipSync<G, L>>, G: Deref<Target = NetworkGraph<L>>, L: Deref> GossipSync<&P2PGossipSync<G, &'a (dyn Access + Send + Sync), L>, R, G, &'a (dyn Access + Send + Sync), L>where
L::Target: Logger,
(C-not exported) as the bindings concretize everything and have constructors for us
sourcepub fn rapid(gossip_sync: R) -> Self
pub fn rapid(gossip_sync: R) -> Self
Initializes a new GossipSync::Rapid
variant.
source§impl<'a, L: Deref> GossipSync<&P2PGossipSync<&'a NetworkGraph<L>, &'a (dyn Access + Send + Sync), L>, &RapidGossipSync<&'a NetworkGraph<L>, L>, &'a NetworkGraph<L>, &'a (dyn Access + Send + Sync), L>where
L::Target: Logger,
impl<'a, L: Deref> GossipSync<&P2PGossipSync<&'a NetworkGraph<L>, &'a (dyn Access + Send + Sync), L>, &RapidGossipSync<&'a NetworkGraph<L>, L>, &'a NetworkGraph<L>, &'a (dyn Access + Send + Sync), L>where
L::Target: Logger,
(C-not exported) as the bindings concretize everything and have constructors for us
sourcepub fn none() -> Self
pub fn none() -> Self
Initializes a new GossipSync::None
variant.