# Struct alsa::mixer::Selem [−] [src]

    pub struct Selem<'a>(_);

Wraps an Elem as a Selem

## Methods

### `impl<'a> Selem<'a>`
[src]

#### `fn new(elem: Elem<'a>) -> Option<Selem<'a>>`

Creates a Selem by wrapping `elem`.

#### `fn register(mixer: &mut Mixer) -> Result<()>`

TODO: This function might change to support regopt and to return the mixer class

#### `fn get_id(&self) -> SelemId`

#### `fn has_capture_volume(&self) -> bool`

#### `fn has_capture_switch(&self) -> bool`

#### `fn has_playback_volume(&self) -> bool`

#### `fn has_playback_switch(&self) -> bool`

#### `fn can_capture(&self) -> bool`

#### `fn can_playback(&self) -> bool`

#### `fn has_volume(&self) -> bool`

#### `fn get_capture_volume_range(&self) -> (i64, i64)`

returns range for capture volume as (min, max) values

#### `fn get_capture_db_range(&self) -> (MilliBel, MilliBel)`

returns (min, max) values.

#### `fn get_playback_volume_range(&self) -> (i64, i64)`

returns (min, max) values.

#### `fn get_playback_db_range(&self) -> (MilliBel, MilliBel)`

returns (min, max) values.

#### `fn is_playback_mono(&self) -> bool`

#### `fn has_capture_channel(&self, channel: SelemChannelId) -> bool`

#### `fn has_playback_channel(&self, channel: SelemChannelId) -> bool`

#### `fn channel_name(channel: SelemChannelId) -> Result<&'static str>`

Gets name from snd_mixer_selem_channel_name

#### `fn get_playback_volume(&self, channel: SelemChannelId) -> Result<i64>`

#### `fn get_playback_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>`

returns volume in millibels.

#### `fn ask_playback_vol_db(&self, volume: i64) -> Result<MilliBel>`

Asks alsa to convert playback volume to millibels.

#### `fn get_capture_volume(&self, channel: SelemChannelId) -> Result<i64>`

#### `fn get_capture_vol_db(&self, channel: SelemChannelId) -> Result<MilliBel>`

returns volume in millibels.

#### `fn ask_capture_vol_db(&self, volume: i64) -> Result<MilliBel>`

Asks alsa to convert capture volume to millibels

#### `fn set_playback_volume(&self, channel: SelemChannelId, value: i64) -> Result<()>`

#### `fn set_playback_volume_all(&self, value: i64) -> Result<()>`

#### `fn set_playback_db(
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>`

#### `fn set_capture_db(
&self,
channel: SelemChannelId,
value: MilliBel,
dir: Round
) -> Result<()>`

#### `fn set_playback_db_all(&self, value: MilliBel, dir: Round) -> Result<()>`

#### `fn set_capture_db_all(&self, value: MilliBel, dir: Round) -> Result<()>`

#### `fn set_capture_volume(&self, channel: SelemChannelId, value: i64) -> Result<()>`

#### `fn set_playback_switch(&self, channel: SelemChannelId, value: i32) -> Result<()>`

#### `fn set_playback_switch_all(&self, value: i32) -> Result<()>`

#### `fn set_capture_switch(&self, channel: SelemChannelId, value: i32) -> Result<()>`

#### `fn set_capture_switch_all(&self, value: i32) -> Result<()>`

#### `fn get_playback_switch(&self, channel: SelemChannelId) -> Result<i32>`

#### `fn get_capture_switch(&self, channel: SelemChannelId) -> Result<i32>`

#### `fn is_enumerated(&self) -> bool`

#### `fn is_enum_playback(&self) -> bool`

#### `fn is_enum_capture(&self) -> bool`

#### `fn get_enum_items(&self) -> Result<u32>`

#### `fn get_enum_item_name(&self, idx: u32) -> Result<String>`

#### `fn iter_enum(&self) -> Result<IterEnum>`

Enumerates over valid Enum values

#### `fn get_enum_item(&self, channel: SelemChannelId) -> Result<u32>`

#### `fn set_enum_item(&self, channel: SelemChannelId, idx: u32) -> Result<()>`

## Trait Implementations

### `impl<'a> Deref for Selem<'a>`
[src]

#### `type Target = Elem<'a>`

The resulting type after dereferencing

#### `fn deref(&self) -> &Elem<'a>`

returns the elem of this selem

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand 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`)