Trait daybreak::backend::Backend

source ·
pub trait Backend {
    fn get_data(&mut self) -> BackendResult<Vec<u8>>;
    fn put_data(&mut self, data: &[u8]) -> BackendResult<()>;
}
Expand description

The Backend Trait.

It should always read and save in full the data that it is passed. This means that a write to the backend followed by a read must return the same dataset.

Important: You can only return custom errors if the other_errors feature is enabled

Required Methods

Read the all data from the backend.

Write the whole slice to the backend.

Trait Implementations

Read the all data from the backend.
Write the whole slice to the backend.

Implementations on Foreign Types

Implementors