pub enum EncodedLayer {
Empty,
Sectors(Vec<(u32, Vec<u8>)>),
}Expand description
A layer’s encoded form, ready to store: what push_layer builds internally.
Variants§
Empty
The empty layer: no sector carries bytes.
Sectors(Vec<(u32, Vec<u8>)>)
(sector_id, tag plus REE stream), ascending by sector_id, with the
empty sectors omitted.
Implementations§
Source§impl EncodedLayer
impl EncodedLayer
Sourcepub fn single(stream: Vec<u8>) -> Result<Self>
pub fn single(stream: Vec<u8>) -> Result<Self>
One sector’s stream, as sector 0 of a layer.
stream is exactly what ree::encode or ree::encode_runs returned:
the REE tag, then the stream. A stream with no tag cannot be stored - an
all-black sector is the empty-layer form - so it is rejected here rather
than reaching the layer table.
Trait Implementations§
Source§impl Clone for EncodedLayer
impl Clone for EncodedLayer
Source§fn clone(&self) -> EncodedLayer
fn clone(&self) -> EncodedLayer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EncodedLayer
impl RefUnwindSafe for EncodedLayer
impl Send for EncodedLayer
impl Sync for EncodedLayer
impl Unpin for EncodedLayer
impl UnsafeUnpin for EncodedLayer
impl UnwindSafe for EncodedLayer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more