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.