pub fn write(&self, addr: u64, data: &[u8]) -> Result<Option<Arc<Barrier>>> {
        if let Some((base, offset, dev)) = self.resolve(addr) {
            // OK to unwrap as lock() failing is a serious error condition and should panic.
            Ok(dev
                .lock()
                .expect("Failed to acquire device lock")
                .write(base, offset, data))
        } else {
            Err(Error::MissingAddressRange)
        }
    }
/// Writes `data` to the device that owns the range containing `addr`.
///
/// Returns true on success, otherwise `data` is untouched.
Writes `data` to the device that owns the range containing `addr`.
Returns true on success, otherwise `data` is untouched.
Writes ` data ` to the device that owns the range containing ` addr ` . Returns true on success otherwise ` data ` is untouched .
pub fn write(&self, addr: u64, data: &[u8]) -> Result<Option<Arc<Barrier>>> {
        if let Some((base, offset, dev)) = self.resolve(addr) {
            // OK to unwrap as lock() failing is a serious error condition and should panic.
            Ok(dev
                .lock()
                .expect("Failed to acquire device lock")
                .write(base, offset, data))
        } else {
            Err(Error::MissingAddressRange)
        }
    }
pub fn write ( & self , addr : u64 , data : & [ u8 ] ) -> Result < Option < Arc < Barrier > > > { if let Some ( ( base , offset , dev ) ) = self . resolve ( addr ) { // OK to unwrap as lock() failing is a serious error condition and should panic. Ok ( dev . lock ( ) . expect ( " " ) . write ( base , offset , data ) ) } else { Err ( Error :: MissingAddressRange ) } }
Writes `data` to the device that owns the range containing `addr`.
Writes ` data ` to the device that owns the range containing ` addr ` .
&self
addr
u64
data
&[u8]
&self
addr
u64
data
&[u8]