[][src]Trait kernel::file::device::Device

pub trait Device: Send + Sync {
    fn read(&self, content: &mut [u8]) -> i32;
fn write(&self, content: &[u8]) -> i32; }

Device trait

All device should implement their own synchronize mechanisms.

Required methods

fn read(&self, content: &mut [u8]) -> i32

Read from file to content and returns number of characters (<= content.len()) read.

fn write(&self, content: &[u8]) -> i32

Write content to file and returns number of characters written.

Loading content...

Implementors

Loading content...