Function get_connector

Source
pub fn get_connector(id: impl ToConnectorId) -> Connector
Expand description

Returns the connector with the given id.

The linux kernel identifies connectors by a (type, idx) tuple, e.g., DP-0. If the connector does not exist at the time this function is called, a sentinel value is returned. This can be checked by calling exists() on the returned connector.

The id argument can either be an explicit tuple, e.g. (CON_DISPLAY_PORT, 0), or a string that can be parsed to such a tuple, e.g. "DP-0".

The following string prefixes exist:

  • DP
  • eDP
  • HDMI-A
  • HDMI-B
  • EmbeddedWindow - this is an implementation detail of the compositor and used if it runs as an embedded application.
  • VGA
  • DVI-I
  • DVI-D
  • DVI-A
  • Composite
  • SVIDEO
  • LVDS
  • Component
  • DIN
  • TV
  • Virtual
  • DSI
  • DPI
  • Writeback
  • SPI
  • USB