[][src]Struct exocore_transport::Libp2pTransport

pub struct Libp2pTransport { /* fields omitted */ }

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

impl Libp2pTransport[src]

pub fn new(
    local_node: LocalNode,
    config: Libp2pTransportConfig
) -> Libp2pTransport
[src]

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>
[src]

Creates sink and streams that can be used for a given service of a cell.

pub async fn run(self) -> Result<(), Error>[src]

Runs the transport to completion.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,