pub struct MdbShardBuilder { /* private fields */ }Expand description
A builder that mirrors xet-core’s MDBInMemoryShard — accumulate file and
xorb records, then serialize emits the .mdb byte stream in exactly the
order MDBShardInfo::serialize_from does.
Implementations§
Source§impl MdbShardBuilder
impl MdbShardBuilder
pub fn new() -> Self
Sourcepub fn add_file(&mut self, info: MdbFileInfo)
pub fn add_file(&mut self, info: MdbFileInfo)
Add a file’s reconstruction info. Overwrites any prior entry for the same file hash.
Sourcepub fn add_cas(&mut self, info: MdbCasInfo)
pub fn add_cas(&mut self, info: MdbCasInfo)
Add a xorb’s chunk list. Overwrites any prior entry for the same xorb hash.
Trait Implementations§
Source§impl Default for MdbShardBuilder
impl Default for MdbShardBuilder
Source§fn default() -> MdbShardBuilder
fn default() -> MdbShardBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MdbShardBuilder
impl RefUnwindSafe for MdbShardBuilder
impl Send for MdbShardBuilder
impl Sync for MdbShardBuilder
impl Unpin for MdbShardBuilder
impl UnsafeUnpin for MdbShardBuilder
impl UnwindSafe for MdbShardBuilder
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