pub trait Zone {
// Required methods
fn size(&self, name: &str) -> Result<u64, String>;
fn chunk(
&self,
name: &str,
offset: u64,
len: u64,
) -> Result<Vec<u8>, String>;
fn append(&self, name: &str, bytes: &[u8]) -> Result<(), String>;
fn delete(&self, name: &str) -> Result<(), String>;
// Provided method
fn read_all(&self, name: &str) -> Result<Vec<u8>, String> { ... }
}Expand description
A zone of the store, as the proof and the import use it.
Required Methods§
fn size(&self, name: &str) -> Result<u64, String>
fn chunk(&self, name: &str, offset: u64, len: u64) -> Result<Vec<u8>, String>
Sourcefn append(&self, name: &str, bytes: &[u8]) -> Result<(), String>
fn append(&self, name: &str, bytes: &[u8]) -> Result<(), String>
Append, creating the file when it is not there.
fn delete(&self, name: &str) -> Result<(), String>
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".