SourceController

Struct SourceController 

Source
pub struct SourceController {
    pub handler: Handler,
}

Fields§

§handler: Handler

Implementations§

Source§

impl SourceController

Source

pub fn create() -> Result<Self, ControllerError>

Source

pub fn get_server_info(&mut self) -> Result<ServerInfo, ControllerError>

Trait Implementations§

Source§

impl AppControl<ApplicationInfo> for SourceController

Source§

fn list_applications(&mut self) -> Result<Vec<ApplicationInfo>, ControllerError>

Source§

fn get_app_by_index( &mut self, index: u32, ) -> Result<ApplicationInfo, ControllerError>

Source§

fn increase_app_volume_by_percent(&mut self, index: u32, delta: f64)

Source§

fn decrease_app_volume_by_percent(&mut self, index: u32, delta: f64)

Source§

fn move_app_by_index( &mut self, stream_index: u32, device_index: u32, ) -> Result<bool, ControllerError>

Source§

fn move_app_by_name( &mut self, stream_index: u32, device_name: &str, ) -> Result<bool, ControllerError>

Source§

fn set_app_mute( &mut self, index: u32, mute: bool, ) -> Result<bool, ControllerError>

Source§

impl DeviceControl<DeviceInfo> for SourceController

Source§

fn get_default_device(&mut self) -> Result<DeviceInfo, ControllerError>

Source§

fn set_default_device(&mut self, name: &str) -> Result<bool, ControllerError>

Source§

fn list_devices(&mut self) -> Result<Vec<DeviceInfo>, ControllerError>

Source§

fn get_device_by_index( &mut self, index: u32, ) -> Result<DeviceInfo, ControllerError>

Source§

fn get_device_by_name( &mut self, name: &str, ) -> Result<DeviceInfo, ControllerError>

Source§

fn set_device_volume_by_index(&mut self, index: u32, volume: &ChannelVolumes)

Source§

fn set_device_volume_by_name(&mut self, name: &str, volume: &ChannelVolumes)

Source§

fn increase_device_volume_by_percent(&mut self, index: u32, delta: f64)

Source§

fn set_device_mute_by_index(&mut self, index: u32, mute: bool)

Source§

fn set_device_mute_by_name(&mut self, name: &str, mute: bool)

Source§

fn decrease_device_volume_by_percent(&mut self, index: u32, delta: f64)

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