protocols/identify: Revise symbol naming (#2927)

This commit is contained in:
João Oliveira
2022-10-04 01:17:31 +01:00
committed by GitHub
parent 1da75b2b25
commit a7a96e5502
19 changed files with 253 additions and 240 deletions

View File

@ -90,23 +90,23 @@ pub(crate) type THandlerOutEvent<THandler> =
/// addition to the event `enum` itself.
///
/// ``` rust
/// # use libp2p::identify::{Identify, IdentifyEvent};
/// # use libp2p::identify;
/// # use libp2p::ping;
/// # use libp2p::NetworkBehaviour;
/// #[derive(NetworkBehaviour)]
/// #[behaviour(out_event = "Event")]
/// struct MyBehaviour {
/// identify: Identify,
/// identify: identify::Behaviour,
/// ping: ping::Behaviour,
/// }
///
/// enum Event {
/// Identify(IdentifyEvent),
/// Identify(identify::Event),
/// Ping(ping::Event),
/// }
///
/// impl From<IdentifyEvent> for Event {
/// fn from(event: IdentifyEvent) -> Self {
/// impl From<identify::Event> for Event {
/// fn from(event: identify::Event) -> Self {
/// Self::Identify(event)
/// }
/// }