HasEvents

Trait HasEvents 

Source
pub trait HasEvents {
    // Required method
    fn events() -> Vec<Event>;

    // Provided method
    fn event_schemas() -> BTreeMap<String, Schema> { ... }
}
Expand description

A trait that should be implemented by each smart contract to allow the backend.

Required Methods§

Source

fn events() -> Vec<Event>

Returns a list of Events used by the contract.

Provided Methods§

Source

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl HasEvents for PublicKey

Source§

impl HasEvents for Key

Source§

impl HasEvents for bool

Source§

impl HasEvents for i8

Source§

impl HasEvents for i16

Source§

impl HasEvents for i32

Source§

impl HasEvents for i64

Source§

impl HasEvents for u8

Source§

impl HasEvents for u16

Source§

impl HasEvents for u32

Source§

impl HasEvents for u64

Source§

impl HasEvents for ()

Source§

impl HasEvents for U128

Source§

impl HasEvents for U256

Source§

impl HasEvents for U512

Source§

impl HasEvents for URef

Source§

impl<T1: ToBytes + FromBytes> HasEvents for (T1,)

Source§

impl<T1: ToBytes + FromBytes, T2: ToBytes + FromBytes> HasEvents for (T1, T2)

Source§

impl<T1: ToBytes + FromBytes, T2: ToBytes + FromBytes, T3: ToBytes + FromBytes> HasEvents for (T1, T2, T3)

Source§

impl<T: ToBytes + FromBytes> HasEvents for Option<T>

Source§

impl<T: ToBytes + FromBytes, E: ToBytes + FromBytes> HasEvents for Result<T, E>

Source§

impl<T: ToBytes + FromBytes, const N: usize> HasEvents for [T; N]

Implementors§