pub struct FlatLayout {}Expand description
A layout that organizes data into a flat array of chunks with a single merkle node parent.
┌─────────────┐
│ Merkle Node │
└──────┬──────┘
│
┌───────────────┬──────┴────────┬─────────────────┐
│ │ │ │
0 ▼ 1 ▼ 2 ▼ 3 ▼
┌──┬──┬──┐ ┌──┬──┬──┬──┬──┐ ┌──┬──┬──┬──┐ ┌──┬──┬──┬──┬──┬──┐
│0 │1 │2 │ │3 │4 │5 │6 │7 │ │8 │9 │10│11│ │12│13│14│15│16│17│
└──┴──┴──┘ └──┴──┴──┴──┴──┘ └──┴──┴──┴──┘ └──┴──┴──┴──┴──┴──┘Implementations§
Source§impl FlatLayout
impl FlatLayout
Trait Implementations§
Source§impl Clone for FlatLayout
impl Clone for FlatLayout
Source§fn clone(&self) -> FlatLayout
fn clone(&self) -> FlatLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlatLayout
impl Debug for FlatLayout
Source§impl Default for FlatLayout
impl Default for FlatLayout
Source§fn default() -> FlatLayout
fn default() -> FlatLayout
Returns the “default value” for a type. Read more
Source§impl Layout for FlatLayout
impl Layout for FlatLayout
Source§async fn organize<'a>(
&self,
stream: BoxStream<'a, StoreResult<Bytes>>,
store: impl IpldStore + Send + 'a,
) -> StoreResult<BoxStream<'a, StoreResult<Cid>>>
async fn organize<'a>( &self, stream: BoxStream<'a, StoreResult<Bytes>>, store: impl IpldStore + Send + 'a, ) -> StoreResult<BoxStream<'a, StoreResult<Cid>>>
Organizes a stream of chunks into a graph of blocks storing them as either raw blocks or
IPLD node blocks. Read more
Source§impl LayoutSeekable for FlatLayout
impl LayoutSeekable for FlatLayout
Source§async fn retrieve_seekable<'a>(
&self,
cid: &'a Cid,
store: impl IpldStore + Send + Sync + 'a,
) -> StoreResult<Pin<Box<dyn SeekableReader + Send + 'a>>>
async fn retrieve_seekable<'a>( &self, cid: &'a Cid, store: impl IpldStore + Send + Sync + 'a, ) -> StoreResult<Pin<Box<dyn SeekableReader + Send + 'a>>>
Retrieves the underlying byte chunks associated with a given
Cid as a seekable reader.Source§impl PartialEq for FlatLayout
impl PartialEq for FlatLayout
impl StructuralPartialEq for FlatLayout
Auto Trait Implementations§
impl Freeze for FlatLayout
impl RefUnwindSafe for FlatLayout
impl Send for FlatLayout
impl Sync for FlatLayout
impl Unpin for FlatLayout
impl UnwindSafe for FlatLayout
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