Struct Receiver

pub(crate) struct Receiver<C> { pub(in ::sync::mpmc::counter) counter: *mut Counter<C> }

The receiving side.

Fields

counter: *mut Counter<C>

Implementations

impl<C> Receiver<C>

fn counter(&self) -> &Counter<C>

Returns the internal Counter.

fn acquire(&self) -> Receiver<C>

Acquires another receiver reference.

unsafe fn release<F: FnOnce(&C) -> bool>(&self, disconnect: F)

Releases the receiver reference.

Function disconnect will be called if this is the last receiver reference.

Trait Implementations

impl<C> Deref for Receiver<C>

type Target = C;
fn deref(&self) -> &C

impl<C> PartialEq for Receiver<C>

fn eq(&self, other: &Receiver<C>) -> bool

Auto Trait Implementations

impl<C> !Send for Receiver<C>

impl<C> !Sync for Receiver<C>

impl<C> Freeze for Receiver<C> where *mut Counter<C>: Freeze,

impl<C> RefUnwindSafe for Receiver<C> where *mut Counter<C>: RefUnwindSafe,

impl<C> Unpin for Receiver<C> where *mut Counter<C>: Unpin,

impl<C> UnsafeUnpin for Receiver<C> where *mut Counter<C>: UnsafeUnpin,

impl<C> UnwindSafe for Receiver<C> where *mut Counter<C>: UnwindSafe,

Blanket Implementations

impl<P, T> Receiver for Receiver<C> where P: Deref<Target = T> + ?Sized, T: ?Sized,

type Target = T;

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for Receiver<C>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> SizeHint for Receiver<C> where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for Receiver<C>

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

fn into(self) -> U

Calls U::from(self).

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

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

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

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

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