[−][src]Struct susyp2p_core::nodes::handled_node_tasks::Task
Access to a task in the collection.
Methods
impl<'a, TInEvent, TUserData> Task<'a, TInEvent, TUserData>
[src]
pub fn send_event(&mut self, event: TInEvent)
[src]
Sends an event to the given node.
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 id(&self) -> TaskId
[src]
Returns the task id.
pub fn close(self) -> ClosedTask<TInEvent, TUserData>
[src]
Closes the task. Returns the user data.
No further event will be generated for this task, but the connection inside the task will
continue to run until the ClosedTask
is destroyed.
pub fn take_over(&mut self, other: ClosedTask<TInEvent, TUserData>) -> TUserData
[src]
Gives ownership of a closed task. As soon as our task (self
) has some acknowledgment from
the remote that its connection is alive, it will close the connection with other
.
Trait Implementations
Auto Trait Implementations
impl<'a, TInEvent, TUserData> Send for Task<'a, TInEvent, TUserData> where
TInEvent: Send,
TUserData: Send,
TInEvent: Send,
TUserData: Send,
impl<'a, TInEvent, TUserData> Sync for Task<'a, TInEvent, TUserData> where
TInEvent: Send,
TUserData: Sync,
TInEvent: Send,
TUserData: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto 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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same for T
type Output = T
Should always be Self