[−][src]Struct exocore_transport::Libp2pTransport
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]
local_node: LocalNode,
config: Libp2pTransportConfig
) -> Libp2pTransport
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]
&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.
pub async fn run(self) -> Result<(), Error>
[src]
Runs the transport to completion.
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,