pub trait SortedIndexKeyPayload: Sized + AsRef<Self::Content> + AsMut<Self::Content> {
    type Content;
    type FullContent: SortedIndexKeyFullContent<Self>;

    // Required methods
    fn from_sort_key_and_content(sort_key: u16, content: Self::Content) -> Self;
    fn into_sort_key_and_content(self) -> (u16, Self::Content);
    fn as_sort_key_and_content(&self) -> (u16, &Self::Content);

    // Provided methods
    fn into_full_content(self) -> Self::FullContent { ... }
    fn from_content_source<T>(content: T) -> Self
       where T: SortedIndexKeyContentSource<Self> { ... }
}
Expand description

This trait is intended to be implemented by an explicit new type for the given { sort_index: u16, content: T } key for a particular sorted index collection.

Required Associated Types§

Required Methods§

source

fn from_sort_key_and_content(sort_key: u16, content: Self::Content) -> Self

source

fn into_sort_key_and_content(self) -> (u16, Self::Content)

source

fn as_sort_key_and_content(&self) -> (u16, &Self::Content)

Provided Methods§

source

fn into_full_content(self) -> Self::FullContent

source

fn from_content_source<T>(content: T) -> Self

Object Safety§

This trait is not object safe.

Implementors§