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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.