fn open_flags(self, read: bool, write: bool) -> Result<File, Self> {
        if let Ok(file) = OpenOptions::new()
            .read(read)
            .write(write)
            .custom_flags(2048)
            .open(&self.0)
        {
            Ok(file)
        } else {
            Err(self)
        }
    }
/// Open read and write non-blocking device
Open read and write non-blocking device
Open read and write non - blocking device
fn open_flags(self, read: bool, write: bool) -> Result<File, Self> {
        if let Ok(file) = OpenOptions::new()
            .read(read)
            .write(write)
            .custom_flags(2048)
            .open(&self.0)
        {
            Ok(file)
        } else {
            Err(self)
        }
    }
fn open_flags ( self , read : bool , write : bool ) -> Result < File , Self > { if let Ok ( file ) = OpenOptions :: new ( ) . read ( read ) . write ( write ) . custom_flags ( 2048 ) . open ( & self . 0 ) { Ok ( file ) } else { Err ( self ) } }
Open read and write non-blocking device
Open read and write non - blocking device
self
read
bool
write
bool