Skip to main content

Threaded

Trait Threaded 

Source
pub trait Threaded<T> {
    type Rest;

    // Required method
    fn split(self) -> (T, Self::Rest);
}
Expand description

The result of an operation that consumes and returns a value.

rebind and rebind_entry restore the value and return the extra outputs:

Operation returnsValue restoredHelper returns
Ok(value)valueOk(())
Ok((value, a))valueOk(a)
Ok((value, a, b))valueOk((a, b))

Required Associated Types§

Source

type Rest

The outputs beyond the threaded value.

Required Methods§

Source

fn split(self) -> (T, Self::Rest)

Splits into the threaded value and the extra outputs.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, A, B> Threaded<T> for (T, A, B)

Source§

type Rest = (A, B)

Source§

fn split(self) -> (T, (A, B))

Source§

impl<T, A> Threaded<T> for (T, A)

Source§

type Rest = A

Source§

fn split(self) -> (T, A)

Implementors§

Source§

impl<T> Threaded<T> for T