[][src]Struct libp2p_core::nodes::handled_node_tasks::ClosedTask

pub struct ClosedTask<TInEvent, TUserData> { /* fields omitted */ }

Task after it has been closed. The connection to the remote is potentially still going on, but no new event for this task will be received.

Methods

impl<TInEvent, TUserData> ClosedTask<TInEvent, TUserData>[src]

pub fn id(&self) -> TaskId[src]

Returns the task id. Note that this task is no longer part of the collection, and therefore calling task() with this ID will fail.

pub fn user_data(&self) -> &TUserData[src]

Returns the user data associated with the task.

pub fn user_data_mut(&mut self) -> &mut TUserData[src]

Returns the user data associated with the task.

pub fn into_user_data(self) -> TUserData[src]

Finish destroying the task and yield the user data. This closes the connection to the remote.

Trait Implementations

impl<TInEvent, TUserData> Debug for ClosedTask<TInEvent, TUserData> where
    TUserData: Debug
[src]

Auto Trait Implementations

impl<TInEvent, TUserData> Send for ClosedTask<TInEvent, TUserData> where
    TInEvent: Send,
    TUserData: Send

impl<TInEvent, TUserData> Sync for ClosedTask<TInEvent, TUserData> where
    TInEvent: Send,
    TUserData: Sync

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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> Same for T

type Output = T

Should always be Self

impl<T> Erased for T