Struct bable::SimpleBuilder
source · [−]pub struct SimpleBuilder { /* private fields */ }
Expand description
SimpleBuilder
is a faster builder for building table.
However, it can be only used when you do not want to encrypt or compress the data in the table.
If you want to encrypt or compress the data in the table, plese use Builder
instead.
Trait Implementations
sourceimpl TableBuilder for SimpleBuilder
impl TableBuilder for SimpleBuilder
type TableData = SimpleBuildData
fn new(opts: RefCounter<Options>) -> Result<Self>where
Self: Sized,
fn options(&self) -> RefCounter<Options>
sourcefn insert_stale(&mut self, key: &Key, val: &Value, value_len: u32)
fn insert_stale(&mut self, key: &Key, val: &Value, value_len: u32)
The same as insert
function but it also increments the internal
stale_data_size
counter. This value will be used to prioritize this table for
compaction. Read more
sourcefn insert(&mut self, key: &Key, val: &Value, value_len: u32)
fn insert(&mut self, key: &Key, val: &Value, value_len: u32)
Inserts a key-value pair to the block.
sourcefn reached_capacity(&self) -> bool
fn reached_capacity(&self) -> bool
Returns true if we… roughly (?) reached capacity?
Auto Trait Implementations
impl !RefUnwindSafe for SimpleBuilder
impl Send for SimpleBuilder
impl Sync for SimpleBuilder
impl Unpin for SimpleBuilder
impl !UnwindSafe for SimpleBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Checksumer for T
impl<T> Checksumer for T
sourcefn checksum(&self, algorithm: ChecksumAlgorithm) -> Checksumwhere
Self: AsRef<[u8]>,
fn checksum(&self, algorithm: ChecksumAlgorithm) -> Checksumwhere
Self: AsRef<[u8]>,
Calculates checksum of data
.
sourcefn verify_checksum(&self, expected: u64, algo: ChecksumAlgorithm) -> boolwhere
Self: AsRef<[u8]>,
fn verify_checksum(&self, expected: u64, algo: ChecksumAlgorithm) -> boolwhere
Self: AsRef<[u8]>,
Validates the checksum for the data against the given expected checksum. Return true
if the checksum is valid.
sourceimpl<T> Compressor for T
impl<T> Compressor for T
fn compress_to(&self, dst: &mut [u8], cmp: Compression) -> Result<usize, Error>where
Self: AsRef<[u8]>,
fn compress_into_vec(&self, cmp: Compression) -> Result<Vec<u8, Global>, Error>where
Self: AsRef<[u8]>,
fn decompress_to(&self, dst: &mut [u8], cmp: Compression) -> Result<usize, Error>where
Self: AsRef<[u8]>,
fn decompress_into_vec(&self, cmp: Compression) -> Result<Vec<u8, Global>, Error>where
Self: AsRef<[u8]>,
fn max_encoded_len(&self, cmp: Compression) -> usizewhere
Self: AsRef<[u8]>,
sourceimpl<T> Encryptor for T
impl<T> Encryptor for T
sourcefn encrypt(
&mut self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsMut<[u8]>,
fn encrypt(
&mut self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsMut<[u8]>,
Encrypts self with IV. Can be used for both encryption and decryption. Read more
sourcefn encrypt_to_vec(
&self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<Vec<u8, Global>, EncryptError>where
Self: AsRef<[u8]>,
fn encrypt_to_vec(
&self,
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<Vec<u8, Global>, EncryptError>where
Self: AsRef<[u8]>,
Encrypts self with IV to a new Vec
.
Can be used for both encryption and decryption. Read more
sourcefn encrypt_to(
&self,
dst: &mut [u8],
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsRef<[u8]>,
fn encrypt_to(
&self,
dst: &mut [u8],
key: &[u8],
iv: &[u8],
algo: EncryptionAlgorithm
) -> Result<(), EncryptError>where
Self: AsRef<[u8]>,
Encrypts self with IV to dst
.
Can be used for both encryption and decryption. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
sourceimpl<T> Marshaller for T
impl<T> Marshaller for T
sourceimpl<T> MayContain for T
impl<T> MayContain for T
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more