1 /// Check the `util` module to see how the `Card` structure is implemented. 2 pub mod utils; 3 use crate::utils::*; 4 main()5pub fn main() { 6 let card = Card::open_global(); 7 8 let resources = card.resource_handles().unwrap(); 9 for connector in resources.connectors().iter() { 10 let info = card.get_connector(*connector, false).unwrap(); 11 println!("Connector {:?}: {:?}", info.interface(), info.state()); 12 if info.state() == drm::control::connector::State::Connected { 13 println!("\t Modes:\n{:#?}", info.modes()); 14 } 15 } 16 } 17