Skip to main content

IndexKeyContentSource

Trait IndexKeyContentSource 

Source
pub trait IndexKeyContentSource<Payload: IndexKeyPayload>: Sized {
    // Required method
    fn into_content(self) -> Payload::Content;

    // Provided method
    fn into_key(self) -> Payload { ... }
}
Expand description

This trait is intended to be implemented by types which embody the content of a key for a particular index collection.

Note:

  • Multiple types might be mappable into the key payload, and so implement this trait
  • This trait is only one way - from value into content
  • This trait uses a generic, because the same type might be usable as a key for multiple substates

Required Methods§

Source

fn into_content(self) -> Payload::Content

Provided Methods§

Source

fn into_key(self) -> Payload

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl IndexKeyContentSource<NonFungibleVaultNonFungibleKeyPayload> for NonFungibleLocalId

Implementors§