pub struct Channel<T> { /* private fields */ }
Implementations§
source§impl<T> Channel<T>
impl<T> Channel<T>
pub fn new() -> Channel<T>
pub fn send(&self, value: T) -> Result<()>
pub fn try_recv(&self) -> Result<T>
pub async fn recv(&self) -> Result<T>
pub fn close(&self)
pub fn handle<H: From<Sender<T>>>(&self) -> H
pub fn handle_with<P, H: From<(Sender<T>, P)>>(&self, param: P) -> H
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for Channel<T>
impl<T> Send for Channel<T>where T: Send,
impl<T> Sync for Channel<T>where T: Send,
impl<T> Unpin for Channel<T>
impl<T> UnwindSafe for Channel<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