pub trait StorageAPI {
    fn read(&self, offset: u32, len: u32) -> Result<Vec<u8>, Error>;
    fn write(&self, offset: u32, data: &[u8]) -> Result<(), Error>;
}
Expand description

the storage APIs that provided by the host

Required Methods

writes data into the storage file at the given offset

reads data from the storage file at the given offset and length

Implementors