pub struct BuildPolicy {
pub sizing: NodeSizing,
pub align: PageAlignment,
}Expand description
How container nodes are sized and whether the body is page-aligned.
Use the compact or
disk_aligned constructors for typical setups.
Fields§
§sizing: NodeSizing§align: PageAlignmentImplementations§
Source§impl BuildPolicy
impl BuildPolicy
Sourcepub const MIN_TARGET_BYTES: usize = 64
pub const MIN_TARGET_BYTES: usize = 64
Minimum accepted value for NodeSizing::TargetBytes.
Sourcepub fn compact(fanout: usize) -> Self
pub fn compact(fanout: usize) -> Self
Tight, predictable layout: fixed fanout, no padding. Best for in-memory or network use.
Sourcepub fn disk_aligned(page_size: usize) -> Self
pub fn disk_aligned(page_size: usize) -> Self
Disk-tuned layout: each node targets one page, file size is a
multiple of page_size. Best for files that will be pread-ed
or memory-mapped.
Trait Implementations§
Source§impl Clone for BuildPolicy
impl Clone for BuildPolicy
Source§fn clone(&self) -> BuildPolicy
fn clone(&self) -> BuildPolicy
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 moreSource§impl Debug for BuildPolicy
impl Debug for BuildPolicy
Auto Trait Implementations§
impl Freeze for BuildPolicy
impl RefUnwindSafe for BuildPolicy
impl Send for BuildPolicy
impl Sync for BuildPolicy
impl Unpin for BuildPolicy
impl UnsafeUnpin for BuildPolicy
impl UnwindSafe for BuildPolicy
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