pub fn new<'a>(class: &'a str) -> Option<Self> {
        let display = XDisplay::new()
            .expect("Failed to acquire X display!");
        unsafe {
            let rms = XResourceManagerString(*display);
            if !rms.is_null() {
                let db = XrmGetStringDatabase(rms);
                if !db.is_null() {
                    defer!({
                        XrmDestroyDatabase(db);
                    });
                    return Some(Colors::from_database(db, class));
                }
            }
        }
        None
    }
/// Return an Colors struct if one can be obtained from the X Resource Manager.
/// The class specifies the part of the database tree to look under.
/// Giving the class "xterm" will return a struct filled with the values of the keys
///
/// * xterm.foreground
/// * xterm.background
/// * xterm.cursorColor
/// * xterm.color1 through xterm.color15
///
/// If any of those keys are missing, the corresponding field will be set to None.
Return an Colors struct if one can be obtained from the X Resource Manager.
The class specifies the part of the database tree to look under.
Giving the class "xterm" will return a struct filled with the values of the keys



If any of those keys are missing, the corresponding field will be set to None.
Return an Colors struct if one can be obtained from the X Resource Manager . The class specifies the part of the database tree to look under . Giving the class " xterm " will return a struct filled with the values of the keys If any of those keys are missing the corresponding field will be set to None .
pub fn new<'a>(class: &'a str) -> Option<Self> {
        let display = XDisplay::new()
            .expect("Failed to acquire X display!");
        unsafe {
            let rms = XResourceManagerString(*display);
            if !rms.is_null() {
                let db = XrmGetStringDatabase(rms);
                if !db.is_null() {
                    defer!({
                        XrmDestroyDatabase(db);
                    });
                    return Some(Colors::from_database(db, class));
                }
            }
        }
        None
    }
pub fn new < ' a > ( class : & ' a str ) -> Option < Self > { let display = XDisplay :: new ( ) . expect ( " " ) ; unsafe { let rms = XResourceManagerString ( * display ) ; if ! rms . is_null ( ) { let db = XrmGetStringDatabase ( rms ) ; if ! db . is_null ( ) { defer ! ( { XrmDestroyDatabase ( db ) } ) ; return Some ( Colors :: from_database ( db , class ) ) ; } } } None }
Return an Colors struct if one can be obtained from the X Resource Manager.
Return an Colors struct if one can be obtained from the X Resource Manager .
class
&'a str
class
&'a str