pub struct WriteBatch<'a> { /* private fields */ }Expand description
App bytes to stage, before the write that puts them in rows; a failure discards all of them. Each staged file gets a new id from the store’s id source, which the batch borrows while the app stages; the write’s SQL puts the id in the rows that reference the file.
Implementations§
Source§impl<'a> WriteBatch<'a>
impl<'a> WriteBatch<'a>
Sourcepub fn put_file(
&mut self,
namespace: &str,
bytes: impl Into<FileSource>,
place: Place,
) -> FileId
pub fn put_file( &mut self, namespace: &str, bytes: impl Into<FileSource>, place: Place, ) -> FileId
Stage app bytes as a new file in an app namespace, kept in coven’s own copy: on this device only, or for the cloud. A stream is consumed once and never buffered whole. Returns the file’s id for a row to reference.
Auto Trait Implementations§
impl<'a> Freeze for WriteBatch<'a>
impl<'a> !RefUnwindSafe for WriteBatch<'a>
impl<'a> Send for WriteBatch<'a>
impl<'a> !Sync for WriteBatch<'a>
impl<'a> Unpin for WriteBatch<'a>
impl<'a> UnsafeUnpin for WriteBatch<'a>
impl<'a> !UnwindSafe for WriteBatch<'a>
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