mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-25 07:17:40 +01:00
Tag some type aliases with (C-not exported)
Type aliases are now more robustly being exported in the C bindings generator, which requires ensuring we don't include some type aliases which make no sense in bindings.
This commit is contained in:
parent
5ed2985cae
commit
ad19d35a09
2 changed files with 8 additions and 0 deletions
|
@ -886,6 +886,8 @@ impl PendingOutboundPayment {
|
|||
/// issues such as overly long function definitions. Note that the ChannelManager can take any
|
||||
/// type that implements KeysInterface for its keys manager, but this type alias chooses the
|
||||
/// concrete type of the KeysManager.
|
||||
///
|
||||
/// (C-not exported) as Arcs don't make sense in bindings
|
||||
pub type SimpleArcChannelManager<M, T, F, L> = ChannelManager<InMemorySigner, Arc<M>, Arc<T>, Arc<KeysManager>, Arc<F>, Arc<L>>;
|
||||
|
||||
/// SimpleRefChannelManager is a type alias for a ChannelManager reference, and is the reference
|
||||
|
@ -896,6 +898,8 @@ pub type SimpleArcChannelManager<M, T, F, L> = ChannelManager<InMemorySigner, Ar
|
|||
/// helps with issues such as long function definitions. Note that the ChannelManager can take any
|
||||
/// type that implements KeysInterface for its keys manager, but this type alias chooses the
|
||||
/// concrete type of the KeysManager.
|
||||
///
|
||||
/// (C-not exported) as Arcs don't make sense in bindings
|
||||
pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, M, T, F, L> = ChannelManager<InMemorySigner, &'a M, &'b T, &'c KeysManager, &'d F, &'e L>;
|
||||
|
||||
/// Manager which keeps track of a number of channels and sends messages to the appropriate
|
||||
|
|
|
@ -376,6 +376,8 @@ struct PeerHolder<Descriptor: SocketDescriptor> {
|
|||
/// lifetimes). Other times you can afford a reference, which is more efficient, in which case
|
||||
/// SimpleRefPeerManager is the more appropriate type. Defining these type aliases prevents
|
||||
/// issues such as overly long function definitions.
|
||||
///
|
||||
/// (C-not exported) as Arcs don't make sense in bindings
|
||||
pub type SimpleArcPeerManager<SD, M, T, F, C, L> = PeerManager<SD, Arc<SimpleArcChannelManager<M, T, F, L>>, Arc<NetGraphMsgHandler<Arc<NetworkGraph>, Arc<C>, Arc<L>>>, Arc<L>, Arc<IgnoringMessageHandler>>;
|
||||
|
||||
/// SimpleRefPeerManager is a type alias for a PeerManager reference, and is the reference
|
||||
|
@ -384,6 +386,8 @@ pub type SimpleArcPeerManager<SD, M, T, F, C, L> = PeerManager<SD, Arc<SimpleArc
|
|||
/// usage of lightning-net-tokio (since tokio::spawn requires parameters with static lifetimes).
|
||||
/// But if this is not necessary, using a reference is more efficient. Defining these type aliases
|
||||
/// helps with issues such as long function definitions.
|
||||
///
|
||||
/// (C-not exported) as Arcs don't make sense in bindings
|
||||
pub type SimpleRefPeerManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, SD, M, T, F, C, L> = PeerManager<SD, SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, M, T, F, L>, &'e NetGraphMsgHandler<&'g NetworkGraph, &'h C, &'f L>, &'f L, IgnoringMessageHandler>;
|
||||
|
||||
/// A PeerManager manages a set of peers, described by their [`SocketDescriptor`] and marshalls
|
||||
|
|
Loading…
Add table
Reference in a new issue