Home
last modified time | relevance | path

Searched refs:TryRecvError (Results 1 – 25 of 34) sorted by relevance

12

/external/rust/crates/crossbeam-channel/src/
Derr.rs60 pub enum TryRecvError { enum
290 impl fmt::Display for TryRecvError { implementation
293 TryRecvError::Empty => "receiving on an empty channel".fmt(f), in fmt()
294 TryRecvError::Disconnected => "receiving on an empty and disconnected channel".fmt(f), in fmt()
299 impl error::Error for TryRecvError {} implementation
301 impl From<RecvError> for TryRecvError { implementation
302 fn from(err: RecvError) -> TryRecvError { in from() argument
304 RecvError => TryRecvError::Disconnected, in from()
309 impl TryRecvError { implementation
314 TryRecvError::Empty => true, in is_empty()
[all …]
Dlib.rs365 pub use crate::err::{RecvError, RecvTimeoutError, TryRecvError};
Dchannel.rs13 RecvError, RecvTimeoutError, SendError, SendTimeoutError, TryRecvError, TrySendError,
747 pub fn try_recv(&self) -> Result<T, TryRecvError> { in try_recv() argument
755 mem::transmute_copy::<Result<Instant, TryRecvError>, Result<T, TryRecvError>>( in try_recv()
763 mem::transmute_copy::<Result<Instant, TryRecvError>, Result<T, TryRecvError>>( in try_recv()
/external/rust/crates/tokio/src/sync/
Dbroadcast.rs262 pub enum TryRecvError { enum
281 impl fmt::Display for TryRecvError { implementation
284 TryRecvError::Empty => write!(f, "channel empty"), in fmt()
285 TryRecvError::Closed => write!(f, "channel closed"), in fmt()
286 TryRecvError::Lagged(amt) => write!(f, "channel lagged by {}", amt), in fmt()
291 impl std::error::Error for TryRecvError {} implementation
698 ) -> Result<RecvGuard<'_, T>, TryRecvError> { in recv_ref() argument
710 return Err(TryRecvError::Empty); in recv_ref()
759 return Err(TryRecvError::Empty); in recv_ref()
797 return Err(TryRecvError::Lagged(missed)); in recv_ref()
[all …]
Doneshot.rs139 pub enum TryRecvError { enum
159 impl fmt::Display for TryRecvError { implementation
162 TryRecvError::Empty => write!(fmt, "channel empty"), in fmt()
163 TryRecvError::Closed => write!(fmt, "channel closed"), in fmt()
168 impl std::error::Error for TryRecvError {} implementation
659 pub fn try_recv(&mut self) -> Result<T, TryRecvError> { in try_recv() argument
666 None => Err(TryRecvError::Closed), in try_recv()
669 Err(TryRecvError::Closed) in try_recv()
672 return Err(TryRecvError::Empty); in try_recv()
675 Err(TryRecvError::Closed) in try_recv()
/external/rust/crates/crossbeam-channel/src/flavors/
Dat.rs10 use crate::err::{RecvTimeoutError, TryRecvError};
43 pub fn try_recv(&self) -> Result<Instant, TryRecvError> { in try_recv() argument
47 return Err(TryRecvError::Empty); in try_recv()
52 return Err(TryRecvError::Empty); in try_recv()
61 Err(TryRecvError::Empty) in try_recv()
159 Err(TryRecvError::Disconnected) => { in try_select()
163 Err(TryRecvError::Empty) => false, in try_select()
Dtick.rs11 use crate::err::{RecvTimeoutError, TryRecvError};
38 pub fn try_recv(&self) -> Result<Instant, TryRecvError> { in try_recv() argument
44 return Err(TryRecvError::Empty); in try_recv()
129 Err(TryRecvError::Disconnected) => { in try_select()
133 Err(TryRecvError::Empty) => false, in try_select()
Dnever.rs9 use crate::err::{RecvTimeoutError, TryRecvError};
32 pub fn try_recv(&self) -> Result<T, TryRecvError> { in try_recv() argument
33 Err(TryRecvError::Empty) in try_recv()
Dzero.rs13 use crate::err::{RecvTimeoutError, SendTimeoutError, TryRecvError, TrySendError};
259 pub fn try_recv(&self) -> Result<T, TryRecvError> { in try_recv() argument
267 unsafe { self.read(token).map_err(|_| TryRecvError::Disconnected) } in try_recv()
269 Err(TryRecvError::Disconnected) in try_recv()
271 Err(TryRecvError::Empty) in try_recv()
Darray.rs26 use crate::err::{RecvTimeoutError, SendTimeoutError, TryRecvError, TrySendError};
394 pub fn try_recv(&self) -> Result<T, TryRecvError> { in try_recv() argument
398 unsafe { self.read(token).map_err(|_| TryRecvError::Disconnected) } in try_recv()
400 Err(TryRecvError::Empty) in try_recv()
Dlist.rs13 use crate::err::{RecvTimeoutError, SendTimeoutError, TryRecvError, TrySendError};
426 pub fn try_recv(&self) -> Result<T, TryRecvError> { in try_recv() argument
430 unsafe { self.read(token).map_err(|_| TryRecvError::Disconnected) } in try_recv()
432 Err(TryRecvError::Empty) in try_recv()
/external/rust/crates/crossbeam-channel/tests/
Dtick.rs8 use crossbeam_channel::{after, select, tick, Select, TryRecvError};
20 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in fire()
31 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in fire()
58 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in intervals()
63 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in intervals()
127 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in recv()
Dafter.rs8 use crossbeam_channel::{after, select, Select, TryRecvError};
20 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in fire()
31 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in fire()
104 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in recv()
126 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in recv_timeout()
Dmpsc.rs23 use std::sync::mpsc::{RecvError, RecvTimeoutError, TryRecvError};
78 pub fn try_recv(&self) -> Result<T, TryRecvError> { in try_recv() argument
80 cc::TryRecvError::Empty => TryRecvError::Empty, in try_recv()
81 cc::TryRecvError::Disconnected => TryRecvError::Disconnected, in try_recv()
479 assert_eq!(rx.try_recv(), Err(TryRecvError::Empty)); in oneshot_single_thread_peek_data()
488 assert_eq!(rx.try_recv(), Err(TryRecvError::Disconnected)); in oneshot_single_thread_peek_close()
489 assert_eq!(rx.try_recv(), Err(TryRecvError::Disconnected)); in oneshot_single_thread_peek_close()
495 assert_eq!(rx.try_recv(), Err(TryRecvError::Empty)); in oneshot_single_thread_peek_open()
912 assert_eq!(rx1.try_recv(), Err(TryRecvError::Empty)); in try_recv_states()
916 assert_eq!(rx1.try_recv(), Err(TryRecvError::Empty)); in try_recv_states()
[all …]
Dready.rs9 use crossbeam_channel::{Receiver, Select, TryRecvError, TrySendError};
74 Ok(0) => assert_eq!(r1.try_recv(), Err(TryRecvError::Disconnected)), in disconnected()
86 Ok(0) => assert_eq!(r1.try_recv(), Err(TryRecvError::Disconnected)), in disconnected()
99 Ok(0) => assert_eq!(r2.try_recv(), Err(TryRecvError::Disconnected)), in disconnected()
183 Ok(0) => assert_eq!(r.try_recv(), Err(TryRecvError::Disconnected)), in timeout()
197 Ok(0) => assert_eq!(r.try_recv(), Err(TryRecvError::Disconnected)), in default_when_disconnected()
206 Ok(0) => assert_eq!(r.try_recv(), Err(TryRecvError::Disconnected)), in default_when_disconnected()
398 assert_eq!(r.try_recv(), Err(TryRecvError::Disconnected)); in preflight2()
412 0 => assert_eq!(r.try_recv(), Err(TryRecvError::Disconnected)), in preflight3()
Dlist.rs10 use crossbeam_channel::{RecvError, RecvTimeoutError, TryRecvError};
28 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in smoke()
75 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in try_recv()
79 assert_eq!(r.try_recv(), Err(TryRecvError::Disconnected)); in try_recv()
289 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in mpmc()
Darray.rs10 use crossbeam_channel::{RecvError, RecvTimeoutError, TryRecvError};
28 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in smoke()
86 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in try_recv()
90 assert_eq!(r.try_recv(), Err(TryRecvError::Disconnected)); in try_recv()
160 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in try_send()
Dzero.rs10 use crossbeam_channel::{RecvError, RecvTimeoutError, TryRecvError};
23 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in smoke()
64 assert_eq!(r.try_recv(), Err(TryRecvError::Empty)); in try_recv()
68 assert_eq!(r.try_recv(), Err(TryRecvError::Disconnected)); in try_recv()
/external/rust/crates/futures/tests/
Deager_drop.rs85 assert_eq!(Err(mpsc::TryRecvError::Empty), rx2.try_recv()); in then_drops_eagerly()
109 assert_eq!(Err(mpsc::TryRecvError::Empty), rx2.try_recv()); in and_then_drops_eagerly()
133 assert_eq!(Err(mpsc::TryRecvError::Empty), rx2.try_recv()); in or_else_drops_eagerly()
/external/rust/crates/spin/src/
Dbarrier.rs186 use std::sync::mpsc::{channel, TryRecvError};
206 Err(TryRecvError::Empty) => true, in use_barrier()
/external/rust/crates/futures-channel/src/mpsc/
Dmod.rs176 pub struct TryRecvError { struct
252 impl fmt::Debug for TryRecvError { implementation
259 impl fmt::Display for TryRecvError { implementation
265 impl std::error::Error for TryRecvError {} implementation
1026 pub fn try_next(&mut self) -> Result<Option<T>, TryRecvError> { in try_next() argument
1031 Poll::Pending => Err(TryRecvError { _priv: () }), in try_next()
1174 pub fn try_next(&mut self) -> Result<Option<T>, TryRecvError> { in try_next() argument
1179 Poll::Pending => Err(TryRecvError { _priv: () }), in try_next()
/external/rust/crates/tokio/tests/
Dsync_errors.rs19 is_error::<error::TryRecvError>(); in oneshot_error_bound()
Dsync_broadcast.rs26 Err(broadcast::error::TryRecvError::Empty) => {}
35 broadcast::error::TryRecvError::Lagged(n) => {
46 broadcast::error::TryRecvError::Closed => {}
/external/crosvm/devices/src/
Dserial.rs8 use std::sync::mpsc::{channel, Receiver, TryRecvError};
199 Err(TryRecvError::Empty) => break, in handle_input_thread()
200 Err(TryRecvError::Disconnected) => { in handle_input_thread()
/external/crosvm/devices/src/virtio/
Dconsole.rs6 use std::sync::mpsc::{channel, Receiver, TryRecvError};
180 Err(TryRecvError::Empty) => break, in handle_input()
181 Err(TryRecvError::Disconnected) => { in handle_input()

12