[][src]Struct libp2p::core::nodes::tasks::ClosedTask

pub struct ClosedTask<E, T> { /* 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<E, T> ClosedTask<E, T>[src]

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

Returns the task id.

Note that this task is no longer managed and therefore calling Manager::task() with this ID will fail.

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

Returns the user data associated with the task.

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

Returns the user data associated with the task.

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

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

Trait Implementations

impl<E, T> Debug for ClosedTask<E, T> where
    T: Debug
[src]

Auto Trait Implementations

impl<E, T> !RefUnwindSafe for ClosedTask<E, T>

impl<E, T> Send for ClosedTask<E, T> where
    E: Send,
    T: Send

impl<E, T> Sync for ClosedTask<E, T> where
    E: Send,
    T: Sync

impl<E, T> Unpin for ClosedTask<E, T> where
    T: Unpin

impl<E, T> !UnwindSafe for ClosedTask<E, T>

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, 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<V, T> VZip<V> for T where
    V: MultiLane<T>,