# [−][src]Struct std::sync::mpsc::Select

    pub struct Select { /* fields omitted */ }

Deprecated since 1.32.0:

channel selection will be removed in a future release

🔬 This is a nightly-only experimental API. (`mpsc_select` #27800)

This implementation, while likely sufficient, is unsafe and likely to be error prone. At some point in the future this module will be removed.

The "receiver set" of the select interface. This structure is used to manage a set of receivers which are being selected over.

## Methods

###

`impl Select` | [src]

####

`pub fn new() -> Select` | [src]

Deprecated since 1.32.0:

channel selection will be removed in a future release

🔬 This is a nightly-only experimental API. (`mpsc_select` #27800)

This implementation, while likely sufficient, is unsafe and likely to be error prone. At some point in the future this module will be removed.

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.

# Examples

    #![feature(mpsc_select)]

    use std::sync::mpsc::Select;

    let select = Select::new();Run

####

`pub fn handle<'a, T: Send>(&'a self, rx: &'a Receiver<T>) -> Handle<'a, T>` | [src]

Deprecated since 1.32.0:

channel selection will be removed in a future release

🔬 This is a nightly-only experimental API. (`mpsc_select` #27800)

This implementation, while likely sufficient, is unsafe and likely to be error prone. At some point in the future this module will be removed.

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.

####

`pub fn wait(&self) -> usize` | [src]

Deprecated since 1.32.0:

channel selection will be removed in a future release

🔬 This is a nightly-only experimental API. (`mpsc_select` #27800)

This implementation, while likely sufficient, is unsafe and likely to be error prone. At some point in the future this module will be removed.

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.

## Trait Implementations

###

`impl Debug for Select` | [src]

####

`fn fmt(&self, f: &mut Formatter) -> Result` | [src]

Formats the value using the given formatter. Read more

###

`impl Drop for Select` | [src]

####

`fn drop(&mut self)` | [src]

Executes the destructor for this type. Read more

###

`impl !Send for Select` | [src]

## Auto Trait Implementations

###

`impl !Sync for Select` |

## Blanket Implementations

###

`impl<T> From for T` | [src]

####

`fn from(t: T) -> T` | [src]

Performs the conversion.

###

`impl<T, U> TryFrom for T where T: From<U>,` | [src]

#### `type Error = !`

🔬 This is a nightly-only experimental API. (`try_from` #33417)

The type returned in the event of a conversion error.

####

`fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>` | [src]

🔬 This is a nightly-only experimental API. (`try_from` #33417)

Performs the conversion.

###

`impl<T, U> TryInto for T where U: TryFrom<T>,` | [src]

#### `type Error = <U as TryFrom<T>>::Error`

🔬 This is a nightly-only experimental API. (`try_from` #33417)

The type returned in the event of a conversion error.

####

`fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>` | [src]

🔬 This is a nightly-only experimental API. (`try_from` #33417)

Performs the conversion.

###

`impl<T, U> Into for T where U: From<T>,` | [src]

####

`fn into(self) -> U` | [src]

Performs the conversion.

###

`impl<T> Borrow for T where T: ?Sized,` | [src]

####
ⓘImportant traits for &'_ mut I

### Important traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'a, R: Read + ?Sized> Read for &'a mut Rimpl<'a, W: Write + ?Sized> Write for &'a mut W`

`fn borrow(&self) -> &T` | [src]

Immutably borrows from an owned value. Read more

###

`impl<T> BorrowMut for T where T: ?Sized,` | [src]

####
ⓘImportant traits for &'_ mut I

### Important traits for &'_ mut I

`impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'a, R: Read + ?Sized> Read for &'a mut Rimpl<'a, W: Write + ?Sized> Write for &'a mut W`

`fn borrow_mut(&mut self) -> &mut T` | [src]

Mutably borrows from an owned value. Read more

###

`impl<T> Any for T where T: 'static + ?Sized,` | [src]

####

`fn get_type_id(&self) -> TypeId` | [src]

🔬 This is a nightly-only experimental API. (`get_type_id` #27745)

this method will likely be replaced by an associated static

Gets the `TypeId` of `self`. Read more

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)