pub struct Select { /* fields omitted */ }
The "receiver set" of the select interface. This structure is used to manage a set of receivers which are being selected over.
impl Select
[src]
fn new() -> Select
Creates a new selection structure. This set is initially empty.
Usage of this struct directly can sometimes be burdensome, and usage is much easier through the select!
macro.
#![feature(mpsc_select)] use std::sync::mpsc::Select; let select = Select::new();
fn handle<'a, T:Â Send>(&'a self, rx: &'a Receiver<T>) -> Handle<'a, T>
Creates a new handle into this receiver set for a new receiver. Note that this does not add the receiver to the receiver set, for that you must call the add
method on the handle itself.
fn wait(&self) -> usize
Waits for an event on this receiver set. The returned value is not an index, but rather an id. This id can be queried against any active Handle
structures (each one has an id
method). The handle with the matching id
will have some sort of event available on it. The event could either be that data is available or the corresponding channel has been closed.
impl !Send for Select
[src]
impl Drop for Select
[src]
fn drop(&mut self)
A method called when the value goes out of scope. Read more
impl Debug for Select
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter.
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/sync/mpsc/struct.Select.html