pub struct SPSCSender<T> { /* private fields */ }
Expand description
SPSCSender
Implementations§
Source§impl<T> SPSCSender<T>
impl<T> SPSCSender<T>
Sourcepub fn poll_ready(&mut self, cx: &Context<'_>) -> Poll<Option<()>>
pub fn poll_ready(&mut self, cx: &Context<'_>) -> Poll<Option<()>>
None: closed; Some: the slot is empty
pub fn poll_closed(&mut self, cx: &Context<'_>) -> Poll<()>
Sourcepub fn do_send(&mut self, item: T)
pub fn do_send(&mut self, item: T)
Send item. You should always poll_ready, when Poll::Ready(Some(())) is returned user can then call send. Note: without calling poll_ready, the behavior is undefined.
pub fn send(&mut self, item: T) -> Send<'_, T> ⓘ
pub fn closed(&mut self) -> Closed<'_, T> ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SPSCSender<T>
impl<T> !RefUnwindSafe for SPSCSender<T>
impl<T> !Send for SPSCSender<T>
impl<T> !Sync for SPSCSender<T>
impl<T> Unpin for SPSCSender<T>
impl<T> !UnwindSafe for SPSCSender<T>
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