Struct exocore_transport::p2p::Libp2pTransport [−][src]
pub struct Libp2pTransport { /* fields omitted */ }
Expand description
Libp2p transport used by all services of Exocore through handles. There is one handle per cell per service.
The transport itself is scheduled on an Executor, and its future will complete as soon it’s ready. Once all handles are dropped, all its scheduled tasks will be stopped too.
Implementations
Creates a new transport for given node and config. The node is important here since all messages are authenticated using the node’s private key thanks to secio.
pub fn get_handle(
&mut self,
cell: Cell,
service_type: ServiceType
) -> Result<Libp2pTransportServiceHandle, Error>
pub fn get_handle(
&mut self,
cell: Cell,
service_type: ServiceType
) -> Result<Libp2pTransportServiceHandle, Error>
Creates sink and streams that can be used for a given service of a cell.
Auto Trait Implementations
impl !RefUnwindSafe for Libp2pTransport
impl Send for Libp2pTransport
impl Sync for Libp2pTransport
impl Unpin for Libp2pTransport
impl !UnwindSafe for Libp2pTransport
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more