Struct Sender

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

The sending side.

Fields

counter: *mut Counter<C>

Implementations

impl<C> Sender<C>

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

Returns the internal Counter.

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

Acquires another sender reference.

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

Releases the sender reference.

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

Trait Implementations

impl<C> Deref for Sender<C>

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

impl<C> PartialEq for Sender<C>

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

Auto Trait Implementations

impl<C> !Send for Sender<C>

impl<C> !Sync for Sender<C>

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

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

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

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

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

Blanket Implementations

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

type Target = T;

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for Sender<C>

fn from(t: T) -> T

Returns the argument unchanged.

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

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

impl<T> SizedTypeProperties for Sender<C>

impl<T, U> Into<U> for Sender<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 Sender<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 Sender<C> where U: TryFrom<T>,

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