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

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,

This is not exported to bindings users as the bindings concretize everything and have constructors for us

source

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,

This is not exported to bindings users as the bindings concretize everything and have constructors for us

source

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,

This is not exported to bindings users as the bindings concretize everything and have constructors for us

source

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.