Skip to main content

Formatter

Trait Formatter 

Source
pub trait Formatter {
    // Required methods
    fn key(key: &[u8]) -> String;
    fn value(key: &[u8], value: &[u8]) -> String;

    // Provided methods
    fn key_value(key: &[u8], row: impl AsRef<[u8]>) -> String { ... }
    fn key_maybe_value(key: &[u8], value: Option<impl AsRef<[u8]>>) -> String { ... }
}

Required Methods§

Source

fn key(key: &[u8]) -> String

Source

fn value(key: &[u8], value: &[u8]) -> String

Provided Methods§

Source

fn key_value(key: &[u8], row: impl AsRef<[u8]>) -> String

Source

fn key_maybe_value(key: &[u8], value: Option<impl AsRef<[u8]>>) -> String

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§