pub enum GossipSync<P: Deref<Target = P2PGossipSync<G, U, L>>, R: Deref<Target = RapidGossipSync<G, L>>, G: Deref<Target = NetworkGraph<L>>, U: Deref, L: Deref>where
U::Target: UtxoLookup,
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, U, L>>, G: Deref<Target = NetworkGraph<L>>, U: Deref, L: Deref> GossipSync<P, &RapidGossipSync<G, L>, G, U, L>where
U::Target: UtxoLookup,
L::Target: Logger,
impl<P: Deref<Target = P2PGossipSync<G, U, L>>, G: Deref<Target = NetworkGraph<L>>, U: Deref, L: Deref> GossipSync<P, &RapidGossipSync<G, L>, G, U, L>where U::Target: UtxoLookup, L::Target: Logger,
This is not exported to bindings users 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 UtxoLookup + Send + Sync), L>, R, G, &'a (dyn UtxoLookup + 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 UtxoLookup + Send + Sync), L>, R, G, &'a (dyn UtxoLookup + Send + Sync), L>where L::Target: Logger,
This is not exported to bindings users 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 UtxoLookup + Send + Sync), L>, &RapidGossipSync<&'a NetworkGraph<L>, L>, &'a NetworkGraph<L>, &'a (dyn UtxoLookup + Send + Sync), L>where
L::Target: Logger,
impl<'a, L: Deref> GossipSync<&P2PGossipSync<&'a NetworkGraph<L>, &'a (dyn UtxoLookup + Send + Sync), L>, &RapidGossipSync<&'a NetworkGraph<L>, L>, &'a NetworkGraph<L>, &'a (dyn UtxoLookup + Send + Sync), L>where L::Target: Logger,
This is not exported to bindings users as the bindings concretize everything and have constructors for us
sourcepub fn none() -> Self
pub fn none() -> Self
Initializes a new GossipSync::None
variant.
Auto Trait Implementations§
impl<P, R, G, U, L> RefUnwindSafe for GossipSync<P, R, G, U, L>where P: RefUnwindSafe, R: RefUnwindSafe,
impl<P, R, G, U, L> Send for GossipSync<P, R, G, U, L>where P: Send, R: Send,
impl<P, R, G, U, L> Sync for GossipSync<P, R, G, U, L>where P: Sync, R: Sync,
impl<P, R, G, U, L> Unpin for GossipSync<P, R, G, U, L>where P: Unpin, R: Unpin,
impl<P, R, G, U, L> UnwindSafe for GossipSync<P, R, G, U, L>where P: UnwindSafe, R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more