Trait gear_common::storage::MailboxCallbacks

source ·
pub trait MailboxCallbacks<OutputError> {
    type Value;
    type BlockNumber;
    type GetBlockNumber: GetCallback<Self::BlockNumber>;
    type OnInsert: Callback<(Self::Value, Interval<Self::BlockNumber>)>;
    type OnRemove: Callback<(Self::Value, Interval<Self::BlockNumber>)>;
}
Expand description

Represents store of mailbox’s action callbacks.

Required Associated Types§

source

type Value

Callback relative type.

This value should be the main item of mailbox, which uses this callbacks store.

source

type BlockNumber

Callback relative type.

This type represents block number of stored component in waitlist, which uses this callbacks store.

source

type GetBlockNumber: GetCallback<Self::BlockNumber>

Callback used for getting current block number.

source

type OnInsert: Callback<(Self::Value, Interval<Self::BlockNumber>)>

Callback on success insert.

source

type OnRemove: Callback<(Self::Value, Interval<Self::BlockNumber>)>

Callback on success remove.

Implementors§