Trait Key

Source
pub trait Key: Segmentable {
    // Required method
    fn format(&self, f: &mut Formatter<'_>) -> Result;
}
Expand description

An item that can be used as a key.

Required Methods§

Source

fn format(&self, f: &mut Formatter<'_>) -> Result

Format the key as a Rust expression.

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.

Implementations on Foreign Types§

Source§

impl<'a> Key for &'a str

Source§

fn format(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<'a, T: Debug + Ord> Key for &'a [T]

Source§

fn format(&self, f: &mut Formatter<'_>) -> Result

Source§

impl<T: AsRef<[u8]> + Key> Key for CaseInsensitive<T>

Source§

fn format(&self, f: &mut Formatter<'_>) -> Result

Implementors§