Struct solana_ledger::blockstore_db::WriteBatch
source · pub struct WriteBatch<'a> {
write_batch: RWriteBatch,
map: HashMap<&'static str, &'a ColumnFamily>,
}
Fields§
§write_batch: RWriteBatch
§map: HashMap<&'static str, &'a ColumnFamily>
Implementations§
source§impl<'a> WriteBatch<'a>
impl<'a> WriteBatch<'a>
pub fn put_bytes<C: Column + ColumnName>( &mut self, key: C::Index, bytes: &[u8] ) -> Result<()>
pub fn delete<C: Column + ColumnName>(&mut self, key: C::Index) -> Result<()>
pub fn put<C: TypedColumn + ColumnName>( &mut self, key: C::Index, value: &C::Type ) -> Result<()>
fn get_cf<C: Column + ColumnName>(&self) -> &'a ColumnFamily
sourcefn delete_range_cf<C: Column>(
&mut self,
cf: &ColumnFamily,
from: C::Index,
to: C::Index
) -> Result<()>
fn delete_range_cf<C: Column>( &mut self, cf: &ColumnFamily, from: C::Index, to: C::Index ) -> Result<()>
Adds a [from
, to
) range deletion entry to the batch.
Note that the [from
, to
) deletion range of WriteBatch::delete_range_cf
is different from [from
, to
] of Database::delete_range_cf as we makes
the semantics of Database::delete_range_cf matches the blockstore purge
logic.
Auto Trait Implementations§
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> 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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request