Struct crossbeam_channel::flavors::never::Channel
source · pub(crate) struct Channel<T> {
_marker: PhantomData<T>,
}
Expand description
Channel that never delivers messages.
Fields§
§_marker: PhantomData<T>
Implementations§
source§impl<T> Channel<T>
impl<T> Channel<T>
sourcepub(crate) fn try_recv(&self) -> Result<T, TryRecvError>
pub(crate) fn try_recv(&self) -> Result<T, TryRecvError>
Attempts to receive a message without blocking.
sourcepub(crate) fn recv(
&self,
deadline: Option<Instant>,
) -> Result<T, RecvTimeoutError>
pub(crate) fn recv( &self, deadline: Option<Instant>, ) -> Result<T, RecvTimeoutError>
Receives a message from the channel.
Trait Implementations§
source§impl<T> SelectHandle for Channel<T>
impl<T> SelectHandle for Channel<T>
source§fn try_select(&self, _token: &mut Token) -> bool
fn try_select(&self, _token: &mut Token) -> bool
Attempts to select an operation and returns
true
on success.source§fn register(&self, _oper: Operation, _cx: &Context) -> bool
fn register(&self, _oper: Operation, _cx: &Context) -> bool
Registers an operation for execution and returns
true
if it is now ready.source§fn unregister(&self, _oper: Operation)
fn unregister(&self, _oper: Operation)
Unregisters an operation for execution.
source§fn accept(&self, token: &mut Token, _cx: &Context) -> bool
fn accept(&self, token: &mut Token, _cx: &Context) -> bool
Attempts to select an operation the thread got woken up for and returns
true
on success.Auto Trait Implementations§
impl<T> Freeze for Channel<T>
impl<T> RefUnwindSafe for Channel<T>where
T: RefUnwindSafe,
impl<T> Send for Channel<T>where
T: Send,
impl<T> Sync for Channel<T>where
T: Sync,
impl<T> Unpin for Channel<T>where
T: Unpin,
impl<T> UnwindSafe for Channel<T>where
T: UnwindSafe,
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