doc: bitswap Stats and BitswapEvent, remove re-export of BitswapEvent

This commit is contained in:
Joonas Koivunen 2020-09-22 17:31:42 +03:00
parent c2609247ed
commit 86fd2f7fdf
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,7 @@ use std::{
},
};
/// Event used to communicate with the swarm or the higher level behaviour.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum BitswapEvent {
ReceivedBlock(PeerId, Block),
@ -33,6 +34,7 @@ pub enum BitswapEvent {
ReceivedCancel(PeerId, Cid),
}
/// Bitswap statistics.
#[derive(Debug, Default)]
pub struct Stats {
pub sent_blocks: AtomicU64,

View File

@ -65,7 +65,7 @@ pub use self::{
path::IpfsPath,
repo::{PinKind, PinMode, RepoTypes},
};
pub use bitswap::{BitswapEvent, Block, Stats};
pub use bitswap::{Block, Stats};
pub use cid::Cid;
pub use libp2p::{
core::{