[−][src]Struct rusty_leveldb::WriteBatch
A WriteBatch contains entries to be written to a MemTable (for example) in a compact form.
The storage format is (with the respective length in bytes)
[tag: 1, keylen: ~var, key: keylen, vallen: ~var, val: vallen]
Methods
impl WriteBatch
[src]
pub fn new() -> WriteBatch
[src]
pub fn set_contents(&mut self, from: &[u8])
[src]
Initializes a WriteBatch with a serialized WriteBatch.
pub fn put(&mut self, k: &[u8], v: &[u8])
[src]
Adds an entry to a WriteBatch, to be added to the database.
pub fn delete(&mut self, k: &[u8])
[src]
Marks an entry to be deleted from the database.
pub fn clear(&mut self)
[src]
Clear the contents of a WriteBatch.
pub fn count(&self) -> u32
[src]
Returns how many operations are in a batch.
pub fn sequence(&self) -> u64
[src]
pub fn iter<'a>(&'a self) -> WriteBatchIter<'a>
[src]
pub fn insert_into_memtable(&self, seq: u64, mt: &mut MemTable)
[src]
pub fn encode(self, seq: u64) -> Vec<u8>
[src]
Auto Trait Implementations
impl Unpin for WriteBatch
impl Sync for WriteBatch
impl Send for WriteBatch
impl RefUnwindSafe for WriteBatch
impl UnwindSafe for WriteBatch
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,