pub struct SinkInfo {
Show 22 fields pub index: u32, pub name: CString, pub description: Option<CString>, pub props: Props, pub state: SinkState, pub sample_spec: SampleSpec, pub channel_map: ChannelMap, pub owner_module_index: Option<u32>, pub cvolume: ChannelVolume, pub muted: bool, pub monitor_source_index: Option<u32>, pub monitor_source_name: Option<CString>, pub flags: SinkFlags, pub actual_latency: u64, pub configured_latency: u64, pub driver: Option<CString>, pub base_volume: Volume, pub volume_steps: Option<u32>, pub card_index: Option<u32>, pub ports: Vec<PortInfo>, pub active_port: usize, pub formats: Vec<FormatInfo>,
}
Expand description

A sink connected to a PulseAudio server. if necessary).

Fields§

§index: u32

Server-internal sink ID.

§name: CString

The human readable name of the sink.

§description: Option<CString>

A description of the sink.

§props: Props

A list of properties.

§state: SinkState

The current state of the sink.

§sample_spec: SampleSpec

The format of samples that the sink expects.

§channel_map: ChannelMap

The mapping of channels to positions that the sink expects.

§owner_module_index: Option<u32>

The ID of the module that owns this sink.

§cvolume: ChannelVolume

The volume of the sink.

§muted: bool

Whether the sink is muted.

§monitor_source_index: Option<u32>

The ID of the monitor source for the sink.

§monitor_source_name: Option<CString>

Name of the monitor source for the sink.

§flags: SinkFlags

Flags the sink is configured with.

§actual_latency: u64

The length of queued audio in the output, in microseconds.

§configured_latency: u64

The configured latency of the sink, in microseconds.

§driver: Option<CString>

The name of the driver used for this sink.

§base_volume: Volume

The base volume of the sink.

§volume_steps: Option<u32>

The number of individual steps in volume, for sinks which do not support arbitrary volumes.

§card_index: Option<u32>

The index of the card this sink belongs to.

§ports: Vec<PortInfo>

A sink has at least one port a plug can be plugged into, and only one port can be active at any given time.

§active_port: usize

The index of the currently active port.

§formats: Vec<FormatInfo>

The list of supported sample formats.

Implementations§

source§

impl SinkInfo

source

pub fn new_dummy(index: u32) -> Self

Creates a “dummy” sink, which the PulseAudio server returns when there are no sinks.

Trait Implementations§

source§

impl Clone for SinkInfo

source§

fn clone(&self) -> SinkInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SinkInfo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SinkInfo

source§

fn default() -> SinkInfo

Returns the “default value” for a type. Read more
source§

impl PartialEq for SinkInfo

source§

fn eq(&self, other: &SinkInfo) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TagStructRead for SinkInfo

source§

fn read( ts: &mut TagStructReader<'_>, protocol_version: u16 ) -> Result<SinkInfo, ProtocolError>

Read an instance of Self from a tagstruct.
source§

impl TagStructWrite for SinkInfo

source§

fn write( &self, w: &mut TagStructWriter<'_>, protocol_version: u16 ) -> Result<(), ProtocolError>

Write self into a tagstruct.
source§

impl CommandReply for SinkInfo

source§

impl Eq for SinkInfo

source§

impl StructuralPartialEq for SinkInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.