pub struct RapidGossipSync<NG: Deref<Target = NetworkGraph<L>>, L: Deref>where
    L::Target: Logger,
{ /* private fields */ }
Expand description

The main Rapid Gossip Sync object.

See crate-level documentation for usage.

Implementations§

Instantiate a new RapidGossipSync instance.

Sync gossip data from a file. Returns the last sync timestamp to be used the next time rapid sync data is queried.

network_graph: The network graph to apply the updates to

sync_path: Path to the file where the gossip update data is located

Update network graph from binary data. Returns the last sync timestamp to be used the next time rapid sync data is queried.

network_graph: network graph to be updated

update_data: &[u8] binary stream that comprises the update data

Gets a reference to the underlying NetworkGraph which was provided in RapidGossipSync::new.

(C-not exported) as bindings don’t support a reference-to-a-reference yet

Returns whether a rapid gossip sync has completed at least once.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.