pub struct WriteBatch<R: GridRow> { /* private fields */ }Expand description
Operations collected by GridWriter::batch, written when its closure
returns and published in one snapshot. Each method writes what the
GridWriter method of the same name writes.
Implementations§
Source§impl<R: GridRow> WriteBatch<R>
impl<R: GridRow> WriteBatch<R>
Sourcepub fn upsert(&mut self, row: impl Into<Arc<R>>)
pub fn upsert(&mut self, row: impl Into<Arc<R>>)
Inserts or replaces a row by key and highlights the changed columns.
Sourcepub fn upsert_silent(&mut self, row: impl Into<Arc<R>>)
pub fn upsert_silent(&mut self, row: impl Into<Arc<R>>)
Inserts or replaces a row by key without highlight.
Sourcepub fn mark_changed(&mut self, key: R::Key, columns: ColumnSet)
pub fn mark_changed(&mut self, key: R::Key, columns: ColumnSet)
Highlights columns of an existing row without replacing it.
Sourcepub fn replace_all(&mut self, rows: impl IntoIterator<Item = Arc<R>>)
pub fn replace_all(&mut self, rows: impl IntoIterator<Item = Arc<R>>)
Replaces every row, without highlight.
Sourcepub fn set_pinned_rows(
&mut self,
edge: PinnedEdge,
rows: impl IntoIterator<Item = Arc<R>>,
)
pub fn set_pinned_rows( &mut self, edge: PinnedEdge, rows: impl IntoIterator<Item = Arc<R>>, )
Replaces the rows pinned at edge; see GridWriter::set_pinned_rows.
Sourcepub fn set_progress(&mut self, progress: Option<GridProgress>)
pub fn set_progress(&mut self, progress: Option<GridProgress>)
Shows (Some) or clears (None) the store’s progress; never
buffered by a running reload.
Sourcepub fn finish_reload(
&mut self,
reload: Reload<R>,
snapshot: impl IntoIterator<Item = Arc<R>>,
)
pub fn finish_reload( &mut self, reload: Reload<R>, snapshot: impl IntoIterator<Item = Arc<R>>, )
Finishes reload with the rows it returned, at this point of the
batch: writes before it in the batch are buffered by the reload, and
writes after it are published with the reloaded rows. Ignored if a
newer reload superseded it, like Reload::finish. A reload of
another store is finished there at once, outside the batch.
Auto Trait Implementations§
impl<R> Freeze for WriteBatch<R>
impl<R> !RefUnwindSafe for WriteBatch<R>
impl<R> Send for WriteBatch<R>
impl<R> Sync for WriteBatch<R>
impl<R> Unpin for WriteBatch<R>
impl<R> UnsafeUnpin for WriteBatch<R>
impl<R> !UnwindSafe for WriteBatch<R>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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>
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>
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 more