[][src]Enum libp2p_core::nodes::tasks::Event

pub enum Event<'a, I, O, H, E, HE, T, C = PeerId> {
    TaskClosed {
        task: ClosedTask<I, T>,
        result: Error<E, HE>,
        handler: Option<H>,
    },
    NodeReached {
        task: TaskEntry<'a, I, T>,
        conn_info: C,
    },
    NodeEvent {
        task: TaskEntry<'a, I, T>,
        event: O,
    },
}

Event produced by the Manager.

Variants

TaskClosed

A task has been closed.

This happens once the node handler closes or an error happens.

Fields of TaskClosed

task: ClosedTask<I, T>

The task that has been closed.

result: Error<E, HE>

What happened.

handler: Option<H>

If the task closed before reaching the node, this contains the handler that was passed to add_reach_attempt.

NodeReached

A task has successfully connected to a node.

Fields of NodeReached

task: TaskEntry<'a, I, T>

The task that succeeded.

conn_info: C

Identifier of the node.

NodeEvent

A task has produced an event.

Fields of NodeEvent

task: TaskEntry<'a, I, T>

The task that produced the event.

event: O

The produced event.

Trait Implementations

impl<'a, I: Debug, O: Debug, H: Debug, E: Debug, HE: Debug, T: Debug, C: Debug> Debug for Event<'a, I, O, H, E, HE, T, C>[src]

Auto Trait Implementations

impl<'a, I, O, H, E, HE, T, C> Unpin for Event<'a, I, O, H, E, HE, T, C> where
    C: Unpin,
    E: Unpin,
    H: Unpin,
    HE: Unpin,
    I: Unpin,
    O: Unpin,
    T: Unpin

impl<'a, I, O, H, E, HE, T, C> Sync for Event<'a, I, O, H, E, HE, T, C> where
    C: Sync,
    E: Sync,
    H: Sync,
    HE: Sync,
    I: Send + Sync,
    O: Sync,
    T: Sync

impl<'a, I, O, H, E, HE, T, C> Send for Event<'a, I, O, H, E, HE, T, C> where
    C: Send,
    E: Send,
    H: Send,
    HE: Send,
    I: Send,
    O: Send,
    T: Send

impl<'a, I, O, H, E, HE, T, C = PeerId> !RefUnwindSafe for Event<'a, I, O, H, E, HE, T, C>

impl<'a, I, O, H, E, HE, T, C = PeerId> !UnwindSafe for Event<'a, I, O, H, E, HE, T, C>

Blanket Implementations

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

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

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self