Trait scrypto_test::prelude::SortedIndexKeyPayload
source · 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§
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) -> Selfwhere
T: SortedIndexKeyContentSource<Self>,
Object Safety§
This trait is not object safe.