Trait kernel::schemes::Resource
[−]
[src]
pub trait Resource { fn url(&self) -> URL; fn dup(&self) -> Option<Box<Resource>> { ... } fn read(&mut self, buf: &mut [u8]) -> Option<usize> { ... } fn write(&mut self, buf: &[u8]) -> Option<usize> { ... } fn seek(&mut self, pos: ResourceSeek) -> Option<usize> { ... } fn sync(&mut self) -> bool { ... } fn truncate(&mut self, len: usize) -> bool { ... } fn read_to_end(&mut self, vec: &mut Vec<u8>) -> Option<usize> { ... } }
A system resource
Required Methods
Provided Methods
fn dup(&self) -> Option<Box<Resource>>
Duplicate the resource
fn read(&mut self, buf: &mut [u8]) -> Option<usize>
Read data to buffer
fn write(&mut self, buf: &[u8]) -> Option<usize>
Write to resource
fn seek(&mut self, pos: ResourceSeek) -> Option<usize>
Seek
fn sync(&mut self) -> bool
Sync the resource
fn truncate(&mut self, len: usize) -> bool
fn read_to_end(&mut self, vec: &mut Vec<u8>) -> Option<usize>
Implementors
impl Resource for NetworkResource
impl Resource for SchemeResource
impl Resource for DebugResource
impl Resource for DisplayResource
impl Resource for EthernetResource
impl Resource for FileResource
impl Resource for IPResource
impl Resource for WindowResource
impl Resource for VecResource