Trait nuts_backend::HeaderSet
source · pub trait HeaderSet<B: Backend> {
// Required method
fn put_header_bytes(&mut self, bytes: &[u8; 512]) -> Result<(), B::Err>;
}
Expand description
Trait used to update the header of a container.
The container uses the HeaderSet::put_header_bytes()
method to ask the
backend to put the given bytes
into the header. The container does not
know where the backend stores the header, that’s why such a trait is used.
Not more than HEADER_MAX_SIZE
bytes can be stored in the header.
Required Methods§
sourcefn put_header_bytes(&mut self, bytes: &[u8; 512]) -> Result<(), B::Err>
fn put_header_bytes(&mut self, bytes: &[u8; 512]) -> Result<(), B::Err>
Puts the given bytes
into the header of the backend.
The container uses this method to ask the backend to put data into the
header. The container does not know where the backend stores the
header, that’s why such a method is used. Not more than
HEADER_MAX_SIZE
bytes can be stored in the header.