[][src]Trait ipfs_embed_core::Network

pub trait Network<S: StoreParams>: Send + Sync + 'static {
    type Subscription: Stream<Item = NetworkEvent> + Send + Unpin;
    pub fn local_peer_id(&self) -> &PeerId;
pub fn listeners(&self, tx: Sender<Vec<Multiaddr>>);
pub fn external_addresses(&self, tx: Sender<Vec<AddressRecord>>);
pub fn get(&self, cid: Cid);
pub fn cancel_get(&self, cid: Cid);
pub fn sync(&self, cid: Cid, syncer: Arc<dyn BitswapSync>);
pub fn cancel_sync(&self, cid: Cid);
pub fn provide(&self, cid: Cid);
pub fn unprovide(&self, cid: Cid);
pub fn subscribe(&self) -> Self::Subscription; }

Associated Types

type Subscription: Stream<Item = NetworkEvent> + Send + Unpin[src]

Loading content...

Required methods

pub fn local_peer_id(&self) -> &PeerId[src]

pub fn listeners(&self, tx: Sender<Vec<Multiaddr>>)[src]

pub fn external_addresses(&self, tx: Sender<Vec<AddressRecord>>)[src]

pub fn get(&self, cid: Cid)[src]

pub fn cancel_get(&self, cid: Cid)[src]

pub fn sync(&self, cid: Cid, syncer: Arc<dyn BitswapSync>)[src]

pub fn cancel_sync(&self, cid: Cid)[src]

pub fn provide(&self, cid: Cid)[src]

pub fn unprovide(&self, cid: Cid)[src]

pub fn subscribe(&self) -> Self::Subscription[src]

Loading content...

Implementors

Loading content...