pub fn open<P>(path: P) -> io::Result<Device>
        where P: AsRef<Path>,
    {
        let trace = var("RUST_DRM_TRACE").unwrap_or("".into()) == "1";
        // TODO: Check if it's a valid card. (By major/minor number)
        OpenOptions::new()
            .read(true)
            .write(true)
            .open(path)
            .map(|f| {
                Device {
                    fd: BufReader::with_capacity(BUFFER_CAPACITY, f),
                    trace: trace,
                }
            })
    }
/// Opens a card at a particular path.
Opens a card at a particular path.
Opens a card at a particular path .
pub fn open<P>(path: P) -> io::Result<Device>
        where P: AsRef<Path>,
    {
        let trace = var("RUST_DRM_TRACE").unwrap_or("".into()) == "1";
        // TODO: Check if it's a valid card. (By major/minor number)
        OpenOptions::new()
            .read(true)
            .write(true)
            .open(path)
            .map(|f| {
                Device {
                    fd: BufReader::with_capacity(BUFFER_CAPACITY, f),
                    trace: trace,
                }
            })
    }
pub fn open < P > ( path : P ) -> io :: Result < Device > where P : AsRef < Path > , { let trace = var ( " " ) . unwrap_or ( " " . into ( ) ) == " " ; // TODO: Check if it's a valid card. (By major/minor number) OpenOptions :: new ( ) . read ( true ) . write ( true ) . open ( path ) . map ( | f | { Device { fd : BufReader :: with_capacity ( BUFFER_CAPACITY , f ) , trace : trace , } } ) }
Opens a card at a particular path.
Opens a card at a particular path .
path
P