pub struct ExpertFileWriter { /* private fields */ }Expand description
2026-09-25: Creates one file per MoE layer, sized to bytes_per_layer,
writes records at their offsets, and writes manifest.json in finish.
The files are opened without O_DIRECT.
Implementations§
Source§impl ExpertFileWriter
impl ExpertFileWriter
pub fn create(dir: &Path, index: ExpertIndex) -> Result<Self>
pub fn spec(&self) -> &ExpertRecordSpec
Sourcepub fn write_record(
&self,
key: ExpertKey,
header: &ExpertRecordHeader,
projs: &[ProjData<'_>; 3],
) -> Result<()>
pub fn write_record( &self, key: ExpertKey, header: &ExpertRecordHeader, projs: &[ProjData<'_>; 3], ) -> Result<()>
2026-09-25: Pack and write one record; fails when the layer or expert is out of range.
Auto Trait Implementations§
impl Freeze for ExpertFileWriter
impl RefUnwindSafe for ExpertFileWriter
impl Send for ExpertFileWriter
impl Sync for ExpertFileWriter
impl Unpin for ExpertFileWriter
impl UnwindSafe for ExpertFileWriter
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