Struct ckb_store::StoreWriteBatch
source · pub struct StoreWriteBatch { /* private fields */ }
Expand description
TODO(doc): @quake
Implementations§
source§impl StoreWriteBatch
impl StoreWriteBatch
sourcepub fn put(&mut self, col: Col, key: &[u8], value: &[u8]) -> Result<(), Error>
pub fn put(&mut self, col: Col, key: &[u8], value: &[u8]) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
Return WriteBatch serialized size (in bytes).
sourcepub fn insert_cells(
&mut self,
cells: impl Iterator<Item = (OutPoint, CellEntry, Option<CellDataEntry>)>
) -> Result<(), Error>
pub fn insert_cells(
&mut self,
cells: impl Iterator<Item = (OutPoint, CellEntry, Option<CellDataEntry>)>
) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn delete_cells(
&mut self,
out_points: impl Iterator<Item = OutPoint>
) -> Result<(), Error>
pub fn delete_cells(
&mut self,
out_points: impl Iterator<Item = OutPoint>
) -> Result<(), Error>
TODO(doc): @quake
sourcepub fn delete_block_body(
&mut self,
number: BlockNumber,
hash: &Byte32,
txs_len: u32
) -> Result<(), Error>
pub fn delete_block_body(
&mut self,
number: BlockNumber,
hash: &Byte32,
txs_len: u32
) -> Result<(), Error>
Removes the block body from database with corresponding hash, number and txs number
sourcepub fn delete_block(
&mut self,
number: BlockNumber,
hash: &Byte32,
txs_len: u32
) -> Result<(), Error>
pub fn delete_block(
&mut self,
number: BlockNumber,
hash: &Byte32,
txs_len: u32
) -> Result<(), Error>
Removes the entire block from database with corresponding hash, number and txs number