Skip to main content

LexicographicKey

Trait LexicographicKey 

Source
pub trait LexicographicKey {
    // Required method
    fn encode_key(&self, out: &mut Vec<u8>);

    // Provided method
    fn encoded_key(&self) -> Vec<u8>  { ... }
}
Expand description

A value that can encode itself into bytes whose ordering preserves the value’s logical ordering.

Required Methods§

Source

fn encode_key(&self, out: &mut Vec<u8>)

Appends this value’s order-preserving encoding to out.

Provided Methods§

Source

fn encoded_key(&self) -> Vec<u8>

Returns this value’s order-preserving byte encoding.

Implementations on Foreign Types§

Source§

impl LexicographicKey for bool

Source§

fn encode_key(&self, out: &mut Vec<u8>)

Source§

impl LexicographicKey for f64

Source§

fn encode_key(&self, out: &mut Vec<u8>)

Source§

impl LexicographicKey for i64

Source§

fn encode_key(&self, out: &mut Vec<u8>)

Source§

impl LexicographicKey for str

Source§

fn encode_key(&self, out: &mut Vec<u8>)

Source§

impl LexicographicKey for u64

Source§

fn encode_key(&self, out: &mut Vec<u8>)

Source§

impl LexicographicKey for String

Source§

fn encode_key(&self, out: &mut Vec<u8>)

Implementors§