Struct SourceInfo

Source
pub struct SourceInfo<'a> {
Show 22 fields pub name: Option<Cow<'a, str>>, pub index: u32, pub description: Option<Cow<'a, str>>, pub sample_spec: Spec, pub channel_map: Map, pub owner_module: Option<u32>, pub volume: ChannelVolumes, pub mute: bool, pub monitor_of_sink: Option<u32>, pub monitor_of_sink_name: Option<Cow<'a, str>>, pub latency: MicroSeconds, pub driver: Option<Cow<'a, str>>, pub flags: SourceFlagSet, pub proplist: Proplist, pub configured_latency: MicroSeconds, pub base_volume: Volume, pub state: SourceState, pub n_volume_steps: u32, pub card: Option<u32>, pub ports: Vec<SourcePortInfo<'a>>, pub active_port: Option<Box<SourcePortInfo<'a>>>, pub formats: Vec<Info>,
}
Expand description

Stores information about sources.

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 the source.

§index: u32

Index of the source.

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

Description of this source.

§sample_spec: Spec

Sample spec of this source.

§channel_map: Map

Channel map.

§owner_module: Option<u32>

Owning module index, or None.

§volume: ChannelVolumes

Volume of the source.

§mute: bool

Mute switch of the sink.

§monitor_of_sink: Option<u32>

If this is a monitor source, the index of the owning sink, otherwise None.

§monitor_of_sink_name: Option<Cow<'a, str>>

Name of the owning sink, or None.

§latency: MicroSeconds

Length of filled record buffer of this source.

§driver: Option<Cow<'a, str>>

Driver name.

§flags: SourceFlagSet

Flags.

§proplist: Proplist

Property list.

§configured_latency: MicroSeconds

The latency this device has been configured to.

§base_volume: Volume

Some kind of “base” volume that refers to unamplified/unattenuated volume in the context of the input device.

§state: SourceState

State.

§n_volume_steps: u32

Number of volume steps for sources which do not support arbitrary volumes.

§card: Option<u32>

Card index, or None.

§ports: Vec<SourcePortInfo<'a>>

Set of available ports.

§active_port: Option<Box<SourcePortInfo<'a>>>

Pointer to active port in the set, or None.

§formats: Vec<Info>

Set of formats supported by the sink.

Implementations§

Source§

impl SourceInfo<'_>

Source

pub fn to_owned(&self) -> SourceInfo<'static>

Creates a copy with owned data.

Trait Implementations§

Source§

impl<'a> Debug for SourceInfo<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for SourceInfo<'a>

§

impl<'a> RefUnwindSafe for SourceInfo<'a>

§

impl<'a> Send for SourceInfo<'a>

§

impl<'a> Sync for SourceInfo<'a>

§

impl<'a> Unpin for SourceInfo<'a>

§

impl<'a> UnwindSafe for SourceInfo<'a>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.