feat(swarm): remove unused types from public API

Pull-Request: #3497.
This commit is contained in:
Thomas Eizinger
2023-02-24 09:25:27 +11:00
committed by GitHub
parent 79fce51f9b
commit 794b2a23d0
2 changed files with 9 additions and 13 deletions

View File

@ -47,20 +47,11 @@
- Update to `libp2p-swarm-derive` `v0.32.0`. - Update to `libp2p-swarm-derive` `v0.32.0`.
- Remove type parameter from `PendingOutboundConnectionError` and `PendingInboundConnectionError`.
These two types are always used with `std::io::Error`. See [PR 3272].
- Replace `SwarmBuilder::connection_event_buffer_size` with `SwarmBuilder::per_connection_event_buffer_size` . - Replace `SwarmBuilder::connection_event_buffer_size` with `SwarmBuilder::per_connection_event_buffer_size` .
The configured value now applies _per_ connection. The configured value now applies _per_ connection.
The default values remains 7. The default values remains 7.
If you have previously set `connection_event_buffer_size` you should re-evaluate what a good size for a _per connection_ buffer is. If you have previously set `connection_event_buffer_size` you should re-evaluate what a good size for a _per connection_ buffer is.
See [PR 3188]. See [PR 3188].
- Add `PendingConnectionError::LocalPeerId` to differentiate wrong VS local peer ID errors. See [PR 3377].
- Remove `PendingConnectionError:::IO` variant.
This was never constructed.
See [PR 3373].
- Remove `DialError::ConnectionIo` variant. - Remove `DialError::ConnectionIo` variant.
This was never constructed. This was never constructed.
@ -69,6 +60,10 @@
- Introduce `ListenError` and use it within `SwarmEvent::IncomingConnectionError`. - Introduce `ListenError` and use it within `SwarmEvent::IncomingConnectionError`.
See [PR 3375]. See [PR 3375].
- Remove `PendingConnectionError`, `PendingInboundConnectionError` and `PendingOutboundConnectionError` from the public API.
They are no longer referenced anywhere with the addition of `ListenError`.
See [PR 3497].
- Remove `ConnectionId::new`. Manually creating `ConnectionId`s is now unsupported. See [PR 3327]. - Remove `ConnectionId::new`. Manually creating `ConnectionId`s is now unsupported. See [PR 3327].
[PR 3364]: https://github.com/libp2p/rust-libp2p/pull/3364 [PR 3364]: https://github.com/libp2p/rust-libp2p/pull/3364
@ -84,6 +79,7 @@
[PR 3373]: https://github.com/libp2p/rust-libp2p/pull/3373 [PR 3373]: https://github.com/libp2p/rust-libp2p/pull/3373
[PR 3374]: https://github.com/libp2p/rust-libp2p/pull/3374 [PR 3374]: https://github.com/libp2p/rust-libp2p/pull/3374
[PR 3375]: https://github.com/libp2p/rust-libp2p/pull/3375 [PR 3375]: https://github.com/libp2p/rust-libp2p/pull/3375
[PR 3497]: https://github.com/libp2p/rust-libp2p/pull/3497
# 0.41.1 # 0.41.1

View File

@ -108,10 +108,7 @@ pub use behaviour::{
NewListenAddr, NotifyHandler, PollParameters, NewListenAddr, NotifyHandler, PollParameters,
}; };
pub use connection::pool::{ConnectionCounters, ConnectionLimits}; pub use connection::pool::{ConnectionCounters, ConnectionLimits};
pub use connection::{ pub use connection::{ConnectionError, ConnectionId, ConnectionLimit};
ConnectionError, ConnectionId, ConnectionLimit, PendingConnectionError,
PendingInboundConnectionError, PendingOutboundConnectionError,
};
pub use executor::Executor; pub use executor::Executor;
pub use handler::{ pub use handler::{
ConnectionHandler, ConnectionHandlerEvent, ConnectionHandlerSelect, ConnectionHandlerUpgrErr, ConnectionHandler, ConnectionHandlerEvent, ConnectionHandlerSelect, ConnectionHandlerUpgrErr,
@ -124,6 +121,9 @@ pub use registry::{AddAddressResult, AddressRecord, AddressScore};
use connection::pool::{EstablishedConnection, Pool, PoolConfig, PoolEvent}; use connection::pool::{EstablishedConnection, Pool, PoolConfig, PoolEvent};
use connection::IncomingInfo; use connection::IncomingInfo;
use connection::{
PendingConnectionError, PendingInboundConnectionError, PendingOutboundConnectionError,
};
use dial_opts::{DialOpts, PeerCondition}; use dial_opts::{DialOpts, PeerCondition};
use futures::{executor::ThreadPoolBuilder, prelude::*, stream::FusedStream}; use futures::{executor::ThreadPoolBuilder, prelude::*, stream::FusedStream};
use libp2p_core::muxing::SubstreamBox; use libp2p_core::muxing::SubstreamBox;