Skip to main content

WavlTreeKeyable

Trait WavlTreeKeyable 

Source
pub trait WavlTreeKeyable<K: ?Sized> {
    type Key<'a>: Borrow<K>
       where Self: 'a;

    // Required method
    fn get_key(&self) -> Self::Key<'_>;
}
Expand description

Trait that types must implement to expose a key for WavlTree sorting and lookup.

Required Associated Types§

Source

type Key<'a>: Borrow<K> where Self: 'a

The type of key yielded by get_key, borrowing K.

Implementations may return an owned/by-value key (e.g. (u64, usize) or i32) or a borrowed/by-reference key (e.g. &'a KeyStruct).

Required Methods§

Source

fn get_key(&self) -> Self::Key<'_>

Returns the key of this object.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§