pub struct SortedPackedLongBinding;Expand description
Binding for i64 values using sorted packed (variable-length,
order-preserving) encoding.
Values in [-119, 120] are stored in a single byte. Larger values use
2-9 bytes. Unlike PackedLongBinding, the byte representation DOES
sort in the same order as the integer values, making this suitable for
database keys when compactness is also desired.
Implementations§
Trait Implementations§
Source§impl Clone for SortedPackedLongBinding
impl Clone for SortedPackedLongBinding
Source§fn clone(&self) -> SortedPackedLongBinding
fn clone(&self) -> SortedPackedLongBinding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SortedPackedLongBinding
Source§impl Debug for SortedPackedLongBinding
impl Debug for SortedPackedLongBinding
Source§impl Default for SortedPackedLongBinding
impl Default for SortedPackedLongBinding
Source§fn default() -> SortedPackedLongBinding
fn default() -> SortedPackedLongBinding
Returns the “default value” for a type. Read more
Source§impl EntryBinding<i64> for SortedPackedLongBinding
impl EntryBinding<i64> for SortedPackedLongBinding
Source§fn entry_to_object(&self, entry: &DatabaseEntry) -> Result<i64>
fn entry_to_object(&self, entry: &DatabaseEntry) -> Result<i64>
Converts a
DatabaseEntry to an object. Read moreSource§fn object_to_entry(&self, object: &i64, entry: &mut DatabaseEntry) -> Result<()>
fn object_to_entry(&self, object: &i64, entry: &mut DatabaseEntry) -> Result<()>
Converts an object to a
DatabaseEntry. Read moreSource§impl TupleBinding<i64> for SortedPackedLongBinding
impl TupleBinding<i64> for SortedPackedLongBinding
Source§fn tuple_to_object(&self, input: &mut TupleInput) -> Result<i64>
fn tuple_to_object(&self, input: &mut TupleInput) -> Result<i64>
Converts tuple input to an object. Read more
Source§fn object_to_tuple(&self, object: &i64, output: &mut TupleOutput) -> Result<()>
fn object_to_tuple(&self, object: &i64, output: &mut TupleOutput) -> Result<()>
Converts an object to tuple output. Read more
Source§fn entry_to_input(entry: &DatabaseEntry) -> TupleInput
fn entry_to_input(entry: &DatabaseEntry) -> TupleInput
Creates a
TupleInput from a DatabaseEntry.Auto Trait Implementations§
impl Freeze for SortedPackedLongBinding
impl RefUnwindSafe for SortedPackedLongBinding
impl Send for SortedPackedLongBinding
impl Sync for SortedPackedLongBinding
impl Unpin for SortedPackedLongBinding
impl UnsafeUnpin for SortedPackedLongBinding
impl UnwindSafe for SortedPackedLongBinding
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