Skip to main content

PathInfoExt

Trait PathInfoExt 

Source
pub trait PathInfoExt {
    // Required methods
    fn support_virtual_mode(&self) -> bool;
    fn clone_group_id(&self) -> Option<usize>;
    fn source_mode_idx(&self) -> Option<usize>;
    fn target_mode_idx(&self) -> Option<usize>;
    fn desktop_mode_idx(&self) -> Option<usize>;
    fn set_clone_group_id(&mut self, id: Option<usize>);
    fn set_source_mode_idx(&mut self, idx: Option<usize>);
    fn set_target_mode_idx(&mut self, idx: Option<usize>);
    fn set_desktop_mode_idx(&mut self, idx: Option<usize>);
}
Expand description

Convenience extension methods for DISPLAYCONFIG_PATH_INFO.

Required Methods§

Source

fn support_virtual_mode(&self) -> bool

Tells wether the flags contain the DISPLAYCONFIG_PATH_SUPPORT_VIRTUAL_MODE flag.

Source

fn clone_group_id(&self) -> Option<usize>

Obtains the clone group id.

It checks for virtual mode support and handles the bits.

Source

fn source_mode_idx(&self) -> Option<usize>

Obtains the source mode index.

It checks for virtual mode support and handles the bits, including testing against DISPLAYCONFIG_PATH_SOURCE_MODE_IDX_INVALID or DISPLAYCONFIG_PATH_MODE_IDX_INVALID appropriately.

Source

fn target_mode_idx(&self) -> Option<usize>

Obtains the target mode index.

It checks for virtual mode support and handles the bits, including testing against DISPLAYCONFIG_PATH_TARGET_MODE_IDX_INVALID or DISPLAYCONFIG_PATH_MODE_IDX_INVALID appropriately.

Source

fn desktop_mode_idx(&self) -> Option<usize>

Obtains the desktop mode id.

It checks for virtual mode support and handles the bits.

Source

fn set_clone_group_id(&mut self, id: Option<usize>)

Sets the clone group id.

It checks for virtual mode support and handles the bits.

It panics if virtual mode is not supported and id is not None.

Source

fn set_source_mode_idx(&mut self, idx: Option<usize>)

Sets the source mode index.

It checks for virtual mode support and handles the bits, including using DISPLAYCONFIG_PATH_SOURCE_MODE_IDX_INVALID or DISPLAYCONFIG_PATH_MODE_IDX_INVALID appropriately.

Source

fn set_target_mode_idx(&mut self, idx: Option<usize>)

Sets the target mode index.

It checks for virtual mode support and handles the bits, including using DISPLAYCONFIG_PATH_TARGET_MODE_IDX_INVALID or DISPLAYCONFIG_PATH_MODE_IDX_INVALID appropriately.

Source

fn set_desktop_mode_idx(&mut self, idx: Option<usize>)

Sets the desktop mode id.

It checks for virtual mode support and handles the bits.

It panics if virtual mode is not supported and id is not None.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§