pub trait SelectHandle {
// Required methods
fn try_select(&self, token: &mut Token) -> bool;
fn deadline(&self) -> Option<Instant>;
fn register(&self, oper: Operation, cx: &Context) -> bool;
fn unregister(&self, oper: Operation);
fn accept(&self, token: &mut Token, cx: &Context) -> bool;
fn is_ready(&self) -> bool;
fn watch(&self, oper: Operation, cx: &Context) -> bool;
fn unwatch(&self, oper: Operation);
}Expand description
A receiver or a sender that can participate in select.
This is a handle that assists select in executing an operation, registration, deciding on the appropriate deadline for blocking, etc.
Required Methods§
Sourcefn 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.
Sourcefn 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.
Sourcefn unregister(&self, oper: Operation)
fn unregister(&self, oper: Operation)
Unregisters an operation for execution.
Sourcefn 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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".