[][src]Struct libpulse_binding::context::introspect::SinkPortInfo

pub struct SinkPortInfo<'a> {
    pub name: Option<Cow<'a, str>>,
    pub description: Option<Cow<'a, str>>,
    pub priority: u32,
    pub available: PortAvailable,
    pub availability_group: Option<Cow<'a, str>>,
    pub type: DevicePortType,
}

Stores information about a specific port of a sink.

Please note that this structure can be extended as part of evolutionary API updates at any time in any new release.

Fields

name: Option<Cow<'a, str>>

Name of this port.

description: Option<Cow<'a, str>>

Description of this port.

priority: u32

The higher this value is, the more useful this port is as a default.

available: PortAvailable

A flag indicating availability status of this port.

availability_group: Option<Cow<'a, str>>
This is supported on crate feature pa_v14 only.

An indentifier for the group of ports that share their availability status with each other.

This is meant especially for handling cases where one 3.5 mm connector is used for headphones, headsets and microphones, and the hardware can only tell that something was plugged in but not what exactly. In this situation the ports for all those devices share their availability status, and PulseAudio can’t tell which one is actually plugged in, and some application may ask the user what was plugged in. Such applications should get a list of all card ports and compare their availability_group fields. Ports that have the same group are those that need input from the user to determine which device was plugged in. The application should then activate the user-chosen port.

May be None, in which case the port is not part of any availability group (which is the same as having a group with only one member).

The group identifier must be treated as an opaque identifier. The string may look like an ALSA control name, but applications must not assume any such relationship. The group naming scheme can change without a warning.

Since one group can include both input and output ports, the grouping should be done using CardPortInfo instead of SinkPortInfo, but this field is duplicated also in SinkPortInfo (and SourcePortInfo) in case someone finds that convenient.

type: DevicePortType
This is supported on crate feature pa_v14 only.

Port device type.

Trait Implementations

impl<'a> Debug for SinkPortInfo<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for SinkPortInfo<'a>[src]

impl<'a> Send for SinkPortInfo<'a>[src]

impl<'a> Sync for SinkPortInfo<'a>[src]

impl<'a> Unpin for SinkPortInfo<'a>[src]

impl<'a> UnwindSafe for SinkPortInfo<'a>[src]

Blanket Implementations

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

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

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

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

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.