cec_rs

Struct CecConnectionCfgBuilder

Source
pub struct CecConnectionCfgBuilder { /* private fields */ }
Expand description

Builder for CecConnectionCfg.

Implementations§

Source§

impl CecConnectionCfgBuilder

Source

pub fn key_press_callback(self, value: Box<FnKeyPress>) -> Self

Source

pub fn command_received_callback(self, value: Box<FnCommand>) -> Self

Source

pub fn log_message_callback(self, value: Box<FnLogMessage>) -> Self

Source

pub fn port(self, value: CString) -> Self

< the COM port to connect to. leave this untouched to autodetect

Source

pub fn open_timeout(self, value: Duration) -> Self

Source

pub fn device_name(self, value: String) -> Self

Source

pub fn device_types(self, value: CecDeviceTypeVec) -> Self

< the device type(s) to use on the CEC bus for libCEC

Source

pub fn physical_address(self, value: u16) -> Self

< the physical address of the CEC adapter

Source

pub fn base_device(self, value: CecLogicalAddress) -> Self

< the logical address of the device to which the adapter is connected. only used when iPhysicalAddress = 0 or when the adapter doesn’t support autodetection

Source

pub fn hdmi_port(self, value: u8) -> Self

< the HDMI port to which the adapter is connected. only used when iPhysicalAddress = 0 or when the adapter doesn’t support autodetection

Source

pub fn tv_vendor(self, value: u32) -> Self

< override the vendor ID of the TV. leave this untouched to autodetect

Source

pub fn wake_devices(self, value: CecLogicalAddresses) -> Self

< list of devices to wake when initialising libCEC or when calling PowerOnDevices() without any parameter.

Source

pub fn power_off_devices(self, value: CecLogicalAddresses) -> Self

< list of devices to power off when calling StandbyDevices() without any parameter.

Source

pub fn get_settings_from_rom(self, value: bool) -> Self

< true to get the settings from the ROM (if set, and a v2 ROM is present), false to use these settings.

Source

pub fn activate_source(self, value: bool) -> Self

< make libCEC the active source on the bus when starting the player application

Source

pub fn power_off_on_standby(self, value: bool) -> Self

< put this PC in standby mode when the TV is switched off. only used when bShutdownOnStandby = 0

Source

pub fn device_language(self, value: String) -> Self

< the menu language used by the client. 3 character ISO 639-2 country code. see http://http://www.loc.gov/standards/iso639-2/ added in 1.6.2

Source

pub fn monitor_only(self, value: bool) -> Self

< won’t allocate a CCECClient when starting the connection when set (same as monitor mode). added in 1.6.3

Source

pub fn adapter_type(self, value: CecAdapterType) -> Self

< type of the CEC adapter that we’re connected to. added in 1.8.2

Source

pub fn combo_key(self, value: CecUserControlCode) -> Self

< key code that initiates combo keys. defaults to CEC_USER_CONTROL_CODE_F1_BLUE. CEC_USER_CONTROL_CODE_UNKNOWN to disable. added in 2.0.5

Source

pub fn combo_key_timeout(self, value: Duration) -> Self

< timeout until the combo key is sent as normal keypress

Source

pub fn button_repeat_rate(self, value: Duration) -> Self

< rate at which buttons autorepeat. 0 means rely on CEC device

Source

pub fn button_release_delay(self, value: Duration) -> Self

< duration after last update until a button is considered released

Source

pub fn double_tap_timeout(self, value: Duration) -> Self

< prevent double taps within this timeout. defaults to 200ms. added in 4.0.0

Source

pub fn autowake_avr(self, value: bool) -> Self

< set to 1 to automatically waking an AVR when the source is activated. added in 4.0.0

Source

pub fn build(self) -> Result<CecConnectionCfg, CecConnectionCfgBuilderError>

Builds a new CecConnectionCfg.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Default for CecConnectionCfgBuilder

Source§

fn default() -> Self

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

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.