mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-14 02:21:21 +00:00
protocols/ping: Properly deprecate types with Ping
prefix (#2937)
Co-authored-by: Elena Frank <elena.frank@protonmail.com> Co-authored-by: João Oliveira <hello@jxs.pt>
This commit is contained in:
@ -91,18 +91,18 @@ pub(crate) type THandlerOutEvent<THandler> =
|
||||
///
|
||||
/// ``` rust
|
||||
/// # use libp2p::identify::{Identify, IdentifyEvent};
|
||||
/// # use libp2p::ping::{Ping, PingEvent};
|
||||
/// # use libp2p::ping;
|
||||
/// # use libp2p::NetworkBehaviour;
|
||||
/// #[derive(NetworkBehaviour)]
|
||||
/// #[behaviour(out_event = "Event")]
|
||||
/// struct MyBehaviour {
|
||||
/// identify: Identify,
|
||||
/// ping: Ping,
|
||||
/// ping: ping::Behaviour,
|
||||
/// }
|
||||
///
|
||||
/// enum Event {
|
||||
/// Identify(IdentifyEvent),
|
||||
/// Ping(PingEvent),
|
||||
/// Ping(ping::Event),
|
||||
/// }
|
||||
///
|
||||
/// impl From<IdentifyEvent> for Event {
|
||||
@ -111,8 +111,8 @@ pub(crate) type THandlerOutEvent<THandler> =
|
||||
/// }
|
||||
/// }
|
||||
///
|
||||
/// impl From<PingEvent> for Event {
|
||||
/// fn from(event: PingEvent) -> Self {
|
||||
/// impl From<ping::Event> for Event {
|
||||
/// fn from(event: ping::Event) -> Self {
|
||||
/// Self::Ping(event)
|
||||
/// }
|
||||
/// }
|
||||
|
Reference in New Issue
Block a user