pub type Receiver<T> = Receiver<GenericStorage<T>>;Expand description
Receiver for one-shot value transfer of generic types
用于泛型类型一次性值传递的接收器
Aliased Type§
pub struct Receiver<T> { /* private fields */ }Implementations§
Source§impl<T: Send> Receiver<T>
impl<T: Send> Receiver<T>
Sourcepub fn try_recv(&mut self) -> Result<T, TryRecvError>
pub fn try_recv(&mut self) -> Result<T, TryRecvError>
Try to receive a value without blocking
Returns Ok(value) if value is ready, Err(TryRecvError::Empty) if pending,
or Err(TryRecvError::Closed) if sender was dropped.
尝试接收值而不阻塞
如果值就绪返回 Ok(value),如果待处理返回 Err(TryRecvError::Empty),
如果发送器被丢弃返回 Err(TryRecvError::Closed)