Sender

Struct Sender 

Source
pub struct Sender<Head, Current, Tail>(/* private fields */)
where
    Head: Concat<(Current,)>,
    <Head as Concat<(Current,)>>::Output: Concat<Tail>,
    Tail: Tuple,
    <Whole<Head, Current, Tail> as Tuple>::TupleList: InElement;
Expand description

The placer of an tuple slot.

The 3 generic represents the position of the target element of the tuple this sender attempts to place. For example, Sender<(A, B), C, (D, E, F)> represents a sender of C in (A, B, C, D, E, F).

The user can only access the slot once by this structure.

Implementations§

Source§

impl<Head, Current, Tail> Sender<Head, Current, Tail>
where Head: Concat<(Current,)>, <Head as Concat<(Current,)>>::Output: Concat<Tail>, Tail: Tuple, <Whole<Head, Current, Tail> as Tuple>::TupleList: InElement,

Source

pub fn send(self, value: Current) -> Result<(), Take<Head, Current, Tail>>
where <Head as Tuple>::TupleList: Count, Place<Head, Current, Tail>: Index<CountOf<Head>, Output = Element<Current>>,

Place the value into the slot, or obtain the resulting tuple if no other senders exist any longer.

Trait Implementations§

Source§

impl<Head, Current: Debug, Tail> Debug for Sender<Head, Current, Tail>
where Head: Concat<(Current,)> + Debug, <Head as Concat<(Current,)>>::Output: Concat<Tail>, Tail: Tuple + Debug, <Whole<Head, Current, Tail> as Tuple>::TupleList: InElement,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Head, Current, Tail> Drop for Sender<Head, Current, Tail>
where Head: Concat<(Current,)>, <Head as Concat<(Current,)>>::Output: Concat<Tail>, Tail: Tuple, <Whole<Head, Current, Tail> as Tuple>::TupleList: InElement,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<Head, Current, Tail> Send for Sender<Head, Current, Tail>
where Head: Concat<(Current,)> + Send, Current: Send, <Head as Concat<(Current,)>>::Output: Concat<Tail>, Tail: Tuple + Send, <Whole<Head, Current, Tail> as Tuple>::TupleList: InElement,

Auto Trait Implementations§

§

impl<Head, Current, Tail> Freeze for Sender<Head, Current, Tail>
where <<<Head as Concat<(Current,)>>::Output as Concat<Tail>>::Output as Tuple>::TupleList: Sized, <Head as Concat<(Current,)>>::Output: Sized,

§

impl<Head, Current, Tail> RefUnwindSafe for Sender<Head, Current, Tail>
where <<<Head as Concat<(Current,)>>::Output as Concat<Tail>>::Output as Tuple>::TupleList: Sized, <Head as Concat<(Current,)>>::Output: Sized, <<<<Head as Concat<(Current,)>>::Output as Concat<Tail>>::Output as Tuple>::TupleList as InElement>::Place: RefUnwindSafe,

§

impl<Head, Current, Tail> !Sync for Sender<Head, Current, Tail>

§

impl<Head, Current, Tail> Unpin for Sender<Head, Current, Tail>
where <<<Head as Concat<(Current,)>>::Output as Concat<Tail>>::Output as Tuple>::TupleList: Sized, <Head as Concat<(Current,)>>::Output: Sized,

§

impl<Head, Current, Tail> UnwindSafe for Sender<Head, Current, Tail>
where <<<Head as Concat<(Current,)>>::Output as Concat<Tail>>::Output as Tuple>::TupleList: Sized, <Head as Concat<(Current,)>>::Output: Sized, <<<<Head as Concat<(Current,)>>::Output as Concat<Tail>>::Output as Tuple>::TupleList as InElement>::Place: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.