pub(crate) struct Tx<T, S> {
inner: Arc<Chan<T, S>>,
}
Expand description
Channel sender.
Fields§
§inner: Arc<Chan<T, S>>
Implementations§
source§impl<T, S> Tx<T, S>
impl<T, S> Tx<T, S>
fn new(chan: Arc<Chan<T, S>>) -> Tx<T, S>
pub(super) fn strong_count(&self) -> usize
pub(super) fn weak_count(&self) -> usize
pub(super) fn downgrade(&self) -> Arc<Chan<T, S>>
pub(super) fn upgrade(chan: Arc<Chan<T, S>>) -> Option<Self>
pub(super) fn semaphore(&self) -> &S
sourcepub(crate) fn same_channel(&self, other: &Self) -> bool
pub(crate) fn same_channel(&self, other: &Self) -> bool
Returns true
if senders belong to the same channel.
Trait Implementations§
Auto Trait Implementations§
impl<T, S> Freeze for Tx<T, S>
impl<T, S> RefUnwindSafe for Tx<T, S>
impl<T, S> Send for Tx<T, S>
impl<T, S> Sync for Tx<T, S>
impl<T, S> Unpin for Tx<T, S>
impl<T, S> UnwindSafe for Tx<T, S>
Blanket Implementations§
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