pub(crate) struct SenderGuarantee<'a, T>(&'a mut Receiver<T>);Expand description
A guarantee that a new sender can be created.
Returned from Receiver::guarantee_new_sender().
The guarantee will be voided if this handle is dropped.
Note: Due to non-lexical lifetimes,
it’s possible to have multiple different SenderGuarantees at the same time.
But this is okay since the compiler will only allow you to use the latest one.
Tuple Fields§
§0: &'a mut Receiver<T>Implementations§
Source§impl<'a, T> SenderGuarantee<'a, T>
impl<'a, T> SenderGuarantee<'a, T>
Sourcepub(crate) fn into_sender(self) -> Sender<T>
pub(crate) fn into_sender(self) -> Sender<T>
Convert the guarantee into a new Sender.
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for SenderGuarantee<'a, T>
impl<'a, T> !UnwindSafe for SenderGuarantee<'a, T>
impl<'a, T> Forget for SenderGuarantee<'a, T>
impl<'a, T> Freeze for SenderGuarantee<'a, T>
impl<'a, T> Move for SenderGuarantee<'a, T>
impl<'a, T> Send for SenderGuarantee<'a, T>
impl<'a, T> Sync for SenderGuarantee<'a, T>
impl<'a, T> Unpin for SenderGuarantee<'a, T>
impl<'a, T> UnsafeUnpin for SenderGuarantee<'a, T>where
&'a mut Receiver<T>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more