mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-28 10:11:19 +00:00
feat(core): make the upgrade
module an implementation detail
Resolves: #3748. Pull-Request: #3915.
This commit is contained in:
parent
5c785b92e7
commit
08f0b5e9c9
@ -23,10 +23,15 @@
|
||||
- Add `global_only::Transport` that refuses to dial IP addresses from private ranges.
|
||||
See [PR 3814].
|
||||
|
||||
- Remove `upgrade::{apply, apply_inbound, apply_outbound, InboundUpgradeApply, OutboundUpgradeApply}` from public API.
|
||||
These are implementation details that should not be depended on.
|
||||
See [PR 3915].
|
||||
|
||||
[spec]: https://github.com/libp2p/specs/blob/master/connections/README.md#multistream-select
|
||||
[PR 3746]: https://github.com/libp2p/rust-libp2p/pull/3746
|
||||
[PR 3883]: https://github.com/libp2p/rust-libp2p/pull/3883
|
||||
[PR 3814]: https://github.com/libp2p/rust-libp2p/pull/3814
|
||||
[PR 3915]: https://github.com/libp2p/rust-libp2p/pull/3915
|
||||
|
||||
## 0.39.2
|
||||
|
||||
|
@ -66,10 +66,12 @@ mod ready;
|
||||
mod select;
|
||||
mod transfer;
|
||||
|
||||
pub(crate) use apply::{
|
||||
apply, apply_inbound, apply_outbound, InboundUpgradeApply, OutboundUpgradeApply,
|
||||
};
|
||||
use futures::future::Future;
|
||||
|
||||
pub use self::{
|
||||
apply::{apply, apply_inbound, apply_outbound, InboundUpgradeApply, OutboundUpgradeApply},
|
||||
denied::DeniedUpgrade,
|
||||
error::UpgradeError,
|
||||
pending::PendingUpgrade,
|
||||
|
@ -29,7 +29,7 @@ pub(crate) use multistream_select::Version;
|
||||
|
||||
// TODO: Still needed?
|
||||
/// Applies an upgrade to the inbound and outbound direction of a connection or substream.
|
||||
pub fn apply<C, U>(
|
||||
pub(crate) fn apply<C, U>(
|
||||
conn: C,
|
||||
up: U,
|
||||
cp: ConnectedPoint,
|
||||
@ -48,7 +48,7 @@ where
|
||||
}
|
||||
|
||||
/// Tries to perform an upgrade on an inbound connection or substream.
|
||||
pub fn apply_inbound<C, U>(conn: C, up: U) -> InboundUpgradeApply<C, U>
|
||||
pub(crate) fn apply_inbound<C, U>(conn: C, up: U) -> InboundUpgradeApply<C, U>
|
||||
where
|
||||
C: AsyncRead + AsyncWrite + Unpin,
|
||||
U: InboundUpgrade<Negotiated<C>>,
|
||||
@ -62,7 +62,7 @@ where
|
||||
}
|
||||
|
||||
/// Tries to perform an upgrade on an outbound connection or substream.
|
||||
pub fn apply_outbound<C, U>(conn: C, up: U, v: Version) -> OutboundUpgradeApply<C, U>
|
||||
pub(crate) fn apply_outbound<C, U>(conn: C, up: U, v: Version) -> OutboundUpgradeApply<C, U>
|
||||
where
|
||||
C: AsyncRead + AsyncWrite + Unpin,
|
||||
U: OutboundUpgrade<Negotiated<C>>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user