Trait gear_common::storage::KeyFor

source ·
pub trait KeyFor {
    type Key;
    type Value;

    // Required method
    fn key_for(value: &Self::Value) -> Self::Key;
}
Expand description

Represents logic of providing key as specified (associated) type for given as specified (associated) type value by reference.

Required Associated Types§

source

type Key

Generated key type.

source

type Value

Value over which key should be generated type.

Required Methods§

source

fn key_for(value: &Self::Value) -> Self::Key

Generates key for given by reference Value.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl KeyFor for QueueKeyGen

§

type Key = MessageId

§

type Value = StoredDispatch

source§

impl KeyFor for WaitlistKeyGen

§

type Key = (ActorId, MessageId)

§

type Value = StoredDispatch

source§

impl<T: Origin> KeyFor for MailboxKeyGen<T>

§

type Key = (T, MessageId)

§

type Value = UserStoredMessage