pub struct Writer { /* private fields */ }Expand description
Appends pages and commits a new directory for one table.
Implementations§
Source§impl Writer
impl Writer
Sourcepub fn create(
path: impl AsRef<Path>,
name: impl Into<String>,
fields: Vec<Field>,
) -> Result<Self>
pub fn create( path: impl AsRef<Path>, name: impl Into<String>, fields: Vec<Field>, ) -> Result<Self>
Creates a new v7 file and its first table.
§Errors
If the file exists, a field has no v7 scalar encoding, or the path cannot be written.
Sourcepub fn append(&mut self, chunk: &Chunk) -> Result<()>
pub fn append(&mut self, chunk: &Chunk) -> Result<()>
Writes one chunk as independently readable column pages.
§Errors
If its width or types differ from the declared table, or a page exceeds its bound.
Sourcepub fn append_at(&mut self, order: (u64, u64), chunk: &Chunk) -> Result<()>
pub fn append_at(&mut self, order: (u64, u64), chunk: &Chunk) -> Result<()>
Writes one chunk and records its source position for directory ordering.
Pages may be encoded by parallel pipeline instances and reach the file in completion order. Their directory entries are sorted by this key at commit, so a scan still observes source order without holding the page bytes until earlier work finishes.
§Errors
The same as Self::append.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Writer
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnsafeUnpin for Writer
impl UnwindSafe for Writer
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